Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Illegal use of update within a function
Message
From
06/05/2004 08:54:39
 
 
To
06/05/2004 03:30:15
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00901468
Message ID:
00901528
Views:
27
You can't modify data in a table from within a UDF.

-Mike

>
>-- @Discrepancy is a singleton from preceding select
>
>IF @Discrepancy <= 0 AND @IsStatus = 0
>   BEGIN
>      UPDATE CBInvoice
>      SET IsStatus = 1
>         WHERE ...
>END
>
>
>Discrepancy (calculated as subtract a -(b+c), where a,b and c are fields in CBInvoice) and IsStatus are both fields in CBInvoice.
>
>
>TIA
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform