EnemyGateIsDown
Technical User
Hi guys,
I am trying to write an update statement which updates a single table but I need to reference another table in order to get the data I need. The query currently looks like:
However this query does not work.. I get the following error:
Can someone help me with the syntax here as I cant seem to find a syntax which works.
Any help is as always greatly appreciated.
Cheers,
Chris
I am trying to write an update statement which updates a single table but I need to reference another table in order to get the data I need. The query currently looks like:
Code:
update reservations, rooms set reservations.room_id = rooms.room_id
where
reservations.roomname = rooms.[Meeting Room]
However this query does not work.. I get the following error:
Code:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near ','.
Can someone help me with the syntax here as I cant seem to find a syntax which works.
Any help is as always greatly appreciated.
Cheers,
Chris