Page 1 of 1

DB2 Table Select and Update

Posted: Wed Oct 27, 2004 9:01 am
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.

Posted: Wed Oct 27, 2004 3:26 pm
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.