Charles Baldo
asked on
Need SQL Query improved for multiple column joins
I have this query
UPDATE Table1
SET
CompareFlag = 'Y'
WHERE
(Table1.doc_id IN
(
SELECT Table2.doc_id
FROM Table2
WHERE (batch_id IS NULL)
));
there are two columns in Table1 one and Table2 two that need to be equal
Doc_ID and ObjectID are in both tables. So the Table1.doc_id IN (select will not work)
Thanks
UPDATE Table1
SET
CompareFlag = 'Y'
WHERE
(Table1.doc_id IN
(
SELECT Table2.doc_id
FROM Table2
WHERE (batch_id IS NULL)
));
there are two columns in Table1 one and Table2 two that need to be equal
Doc_ID and ObjectID are in both tables. So the Table1.doc_id IN (select will not work)
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Jim