Timestamp issue inserting into Oracle table

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

sidharthasaha
Participant
Posts: 9
Joined: Tue May 31, 2005 3:44 pm

Post by sidharthasaha »

I have already tried doing this. Also just to test, I have tried to change the input data and remove the microseconds from the date . All this didn't help in getting the data loaded.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

What is the auto genereated SQL for Insert comming up?
Use the following for the timestamp field at the insert statment if you use User defined SQL

Code: Select all

timestamp':1'
Where :1 is the first field if its the timestamp datatype.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post by reddy »

If the Timestamp value in falt file is a varchar then concatenate it to look like that default timestamp (19) format and then do a stringtotimestamp and it will work.
sidharthasaha
Participant
Posts: 9
Joined: Tue May 31, 2005 3:44 pm

Post by sidharthasaha »

I'm using Oracle Enterprise Stage with LOAD option hence uanble to use user defined queries.

As I have said earlier, to test the job I have hardcoded the timestamp value in the transformer.

StringToTimestamp("2007-10-10 10:10:10", "%yyyy-%mm-%dd %hh:%nn:%ss)

The records are getting rejected in the oracle enterprise stage. I looked into the bad file created by the Oracle Enterprise(sqlldr) and the timestamp value in it is showing up as "10/10/2007 10:10:". I am not sure why the value of seconds is missing. Is there any other option I need to pass or is there any other enviroment variable which is causing this issue?
Post Reply