Page 1 of 1

Updating DB2 stage with system date

Posted: Thu Apr 19, 2007 12:28 am
by Green_Dolphins
Hi,

I am having a stage variable into which i am populating the Dsstart date. Now this date i have to basically write to a DB2 table having a field called Date. I am using a DB2 API stage and would like to understand what user defined query shall i write.

Posted: Thu Apr 19, 2007 4:44 am
by ray.wurlod
Welcome aboard. :D

The easiest solution is to let the DB2 stage generate the SQL. You just provide the connectivity/authorization information, the table name and the column name(s), deliver the values into those columns within your job design, and whether you want to insert, update or some combination thereof.

Posted: Thu Apr 19, 2007 6:26 am
by chulett
Keep in mind that the DB2 stage will want dates in internal format from what I recall.

Posted: Thu Apr 19, 2007 2:42 pm
by ray.wurlod
If that's the case, apply an Iconv() function in the stage variable derivation.