Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Case
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Case
Divers
Thread ID:
00822321
Message ID:
00822321
Vues:
39
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform