Help rewriting this query..
Hi..
I posted this on a Microsoft newsgroup but got no answers. I'm trying to
rewrite this
query:
UPDATE LOCALTABLEROOMSTATUS
SET
GUESTKEY = (select custkey from webtablereservations where reskey = '11937')
WHERE
ROOMNUMB = (select ROOMNUMB from webtablereservations where reskey ='11937')
To something like this:
UPDATE LOCALTABLEROOMSTATUS
SET GUESTKEY = b.custkey
WHERE ROOMNUMB = B.ROOMNUMB
FROM (SELECT * FROM WEBTABLERESERVATIONS WHERE RESKEY = '11937') AS B
because I have multiple fields I want to update in ROOMSTATUS from
WEBTABLERESERVATIONS
Thanks
Rich