Page 1 of 1

Delete from DB2 Table

Posted: Wed Mar 07, 2007 11:07 am
by condond
This is a VERY basic question. How do I perform a delete using DB2_API Stages or any other staes , using what would be a normal subselect in SQL
ex: Delete from A where col1 in ( select col2 from B)

Posted: Wed Mar 07, 2007 11:11 am
by DSguru2B
Welcome Aboard :)
You can do this in any database stage in before/after sql tabs. The sql will be whatever works for you.

Posted: Wed Mar 07, 2007 12:33 pm
by ray.wurlod
How about a simple job that selects COL2 from B, and then uses user-defined SQL to DELETE FROM A WHERE COL1 = ?

Thanks for your help

Posted: Wed Mar 07, 2007 1:11 pm
by condond
I guess its true - We overthink everything the answeres were great thanks