Hmm. You don't want an insert you want an update (based upon your explanation you have said that the PartNo column in Table_New is already populated, you just need the corresponding flags from Table_Old)
In T-SQL the solution looks like this (Sorry I only know rudimentary PL-SQL but, i am imagining, the solution in Oracle would be similar):
SET tnew.Flag1 = told.Flag1,
tnew.Flag2 = told.Flag2,
tnew.Flag3 = told.Flag3
FROM Table_New tnew
INNER JOIN Table_Old told ON tnew.Part_Num = told.Part_Num
If you really want an insert, something like this should work:
INSERT INTO Table_New (Part_Num, Flag1, Flag2, Flag3)
SELECT Part_Num, Flag1, Flag2, Flag3 FROM Table_Old;
The insert statement assumes that you truncate Table_New and insert the Part_Num from Table_Old into Table_New.
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click
on their post!
"Easy is the path to wisdom for those not blinded by themselves."