>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