I need to write an Oracle update query to set a reject flag on one table when the Form Number in the second table has all record equal to null.
Update Table1
set reject = 1
where Table2 has all records where the Form Number = null
I am not a SQL expert and I have to figure this out. I do not know if I use a Select or Join or what.
I would appreciate any help I can get.
Thanks,
arep
Update query no form numbers in second table
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

A RepaskyRank #8,108 · 228 reputationPosted Dec 27, 2012, 12:57 PM EST
arep
UPDATE
HENCNPSET Reject = 1
WHERE FormN in
(SELECT DISTINCT FormN FROM HENCDP WHERE FormN is null)
A RepaskyRank #8,108 · 228 reputationPosted Jan 1, 2013, 10:04 AM EST
UPDATE Table1
SET Reject = 1
WHERE FormN in
(SELECT DISTINCT Table1.FormN
FROM Table1
left outer join Table2
on Table1.FORMN = Table2.formn
WHERE Table2.FormN is null)