DB2 Timestamp Matching

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
ds2000
Premium Member
Premium Member
Posts: 109
Joined: Sun Apr 22, 2007 7:25 pm
Location: ny

DB2 Timestamp Matching

Post by ds2000 »

I have to delete from db2 table where db2 timestamp column is defined as 26,6 and its value is as follows:
2008-09-03 13:42:10.333

While extracting from the db2 table and passing to a dataset, same timestamp column is giving value as follows:
2008-09-03 13:42:10

When i try to delete from the table with above key its not matching and doesnt delete rows. Any suggestion.
Last edited by ds2000 on Tue Sep 09, 2008 2:54 am, edited 1 time in total.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

DB2 has somewhat of an odd default timestamp format (if you are more from an Oracle background). It is yyyy-mm-dd-hh24.mi.ss.nnnnnn

Notice the hyphen between the day and hour, and the decimal points between the minutes, second and milliseconds. Try using a timestamp in this format if you can.

John
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Server job (as marked) or parallel job (as posted)?
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