Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incorrect syntax near '='
Message
 
To
09/11/1999 01:42:54
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00288898
Message ID:
00289060
Views:
31
>I encountered this error message when trying to update
>a record in the SQL Server 6.5
>
>Error message: Incorrect syntax near '='
>
>My SQL statement is:
>Update tablename SET qty = qty + 20 FROM tablename
>where Rtrim(LTrim(Order_no)) = '12345' AND
>RTrim(LTrim(sku_no)) = '11111'

Do not put the FROM clause in an Update statement. So your query should be this one:
Update tablename SET qty = qty + 20
where Rtrim(LTrim(Order_no)) = '12345' AND
RTrim(LTrim(sku_no)) = '11111'
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform