Saturday 23 June 2018

MSSQL - Fix Error - Incorrect syntax near while updating table using Inner join



Watch this example on YouTube



To fix this error replace


Update Product p Inner Join Orders o on p.ProductID = o.ProductID set o.Qty = 25 where o.Qty = 20

with

Update  o Set o.Qty = 25
From Product p
 Inner Join Orders o on p.ProductID = o.ProductID  where o.Qty = 20

No comments:

Post a Comment