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
Loading
A RepaskyPosted Jan 1, 2013, 3:04 PM
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)
A RepaskyPosted Dec 27, 2012, 5:57 PM
arep
UPDATE
HENCNPSET Reject = 1
WHERE FormN in
(SELECT DISTINCT FormN FROM HENCDP WHERE FormN is null)