how to update table set a=c where a<c in DB2 stage

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
yuiduan
Participant
Posts: 15
Joined: Tue Oct 26, 2004 1:06 am

how to update table set a=c where a<c in DB2 stage

Post by yuiduan »

Hi

To update table set col1 = variable1 where col1 < variable1, I get the value1 in a transform stage and out put to a DB2 stage. In db2 stage the sql looks like: update table_name set col1 = ? where a < ?; The problem is in transform stage, I can only map value1 to col1 once, ie, only one ? has been asigned value. If value1 is a job parameter, there is no problem to have update table_name set col1 = #parameter# where col1 < #parameter#. With value1 from inside the job, how can I achive the above updating table?
Thanks in advance for suggestions/sulotions.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: how to update table set a=c where a<c in DB2 stage

Post by sachin1 »

please write custom sql ( i don't have db2 stage but that is what we do in OCI (ORACLE) stage.
Post Reply