Hello All,
I am trying to create an update query on MSSQL using query analyzer and seem to be having a problem using a left join. I am using the following query:
UPDATE Aorders LEFT JOIN orders ON Aorders.NewOrderID = orders.orderid SET orders.odate = Aorders.odate;
and I am getting the following error:
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'JOIN'.
I have tried many different variations on this code without success. Can anyone see anything obviously wrong with this?
Thanks in advance!
I am trying to create an update query on MSSQL using query analyzer and seem to be having a problem using a left join. I am using the following query:
UPDATE Aorders LEFT JOIN orders ON Aorders.NewOrderID = orders.orderid SET orders.odate = Aorders.odate;
and I am getting the following error:
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'JOIN'.
I have tried many different variations on this code without success. Can anyone see anything obviously wrong with this?
Thanks in advance!