Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Case
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Case
Miscellaneous
Thread ID:
00822321
Message ID:
00822321
Views:
41
Hi All:
When I compile the following lines of code in sql query analyzer I get an error message. The error is:

SELECT EXPR1,
Case RTRIM(DESCRIPTION_A)
When 'LOC_PRICE' then
Update Prcy_Export_Club_Details set Loc_Price = Expr1
When 'TXI_AMT1' then
Update Prcy_Export_Club_Details set TXI_AMT1 = Expr1
End
WHERE BILL_ID = PRCY_EXPORT_CLUB_DETAILS.BILL_ID

error:
Server: Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'Update'.
Server: Msg 156, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'When'.
Server: Msg 156, Level 15, State 1, Line 7
Incorrect syntax near the keyword 'End'.

Can anyone tell me what am I doing wrong?
Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform