Reading Date from DB2 Enterprise stage

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
gauravrb
Participant
Posts: 28
Joined: Wed Dec 27, 2006 11:31 pm
Location: Mumbai

Reading Date from DB2 Enterprise stage

Post by gauravrb »

Hi

While reading BIRTH_DATE field of format Date(4) "YYYY-MM-DD" from DB2 database table through DB2 enterprise stage in datastage , is showing a constant default value "1901-01-01" for all the rows at datastage level in spite of different correct date values seen at database level.

I tried increasing the length of field at stage level till 10 but then it was showing the same value.

Is the problem arising due to length or is this a different issue?
Gaurav.
boppanakrishna
Participant
Posts: 106
Joined: Thu Jul 27, 2006 10:05 pm
Location: Mumbai

Post by boppanakrishna »

hi,
You can convert the Datatype ...my suggestion could be you can use To_char function and then start processing

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

Post by ray.wurlod »

Does DB2 have a TO_CHAR() function? You can certainly CAST (BIRTH_DATE AS CHAR(10)) to read it as Char(10).
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