General information
Forum:
Microsoft SQL Server
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only