Delete from DB2 Table

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
condond
Participant
Posts: 3
Joined: Tue Mar 06, 2007 4:01 pm
Location: HOU

Delete from DB2 Table

Post 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)
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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 = ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
condond
Participant
Posts: 3
Joined: Tue Mar 06, 2007 4:01 pm
Location: HOU

Thanks for your help

Post by condond »

I guess its true - We overthink everything the answeres were great thanks
Post Reply