DB2 Table Select and Update

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Dmosher
Participant
Posts: 1
Joined: Thu Oct 14, 2004 7:38 am

DB2 Table Select and Update

Post by Dmosher »

Is it possible to select values from a DB2 table and then update the DB2 table in the same stage? From what I've seen, you can only have an input to or an output from a DB2 stage...and not both.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Take a look at how these stages are set up.

Updates and inserts are handled on the Inputs tab of the stage. This means that they would occur first. Selects occur on the Outputs tab. This means that, if the stage has inputs and outputs, the Select operation occurs last.

I read between the lines in your message that this is not what you desire. To achieve your stated aim you will need two stages. Be careful of database locking, too. Ensure that the Select completes before you start trying to update.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply