UPDATE-SELECT WITH MULTIPLE COLUMNS
Posted on 2007-12-04
I want to copy the data of two columns from the record with an Enroll_ID of 1234 and paste it into the same columns for the record with an PRGM_ID of 2222. This first query here is only with one column, and it works!! But how do I get it to work with two columns? This is all in the same table...
SET OFFER_NUM = (SELECT OFFER_NUM FROM TABLEA WHERE ENROLL_ID = 1234)
WHERE PRGM_ID = 2222
The above statement works! But here's what I'm trying to do below (the same thing, but with multiple columns), and it's not working...
SET (OFFER_NUM, PHONE_YN) = (SELECT OFFER_NUM, PHONE_YN FROM TABLEA WHERE ENROLL_ID = 1234)
WHERE PRGM = 2222
I get the error, "Incorrect syntax near '('" and "Incorrect syntax near the keyword 'WHERE'" Please help, this is driving me up the wall!!