Page 1 of 1

Timestamp issue inserting into Oracle table from flat file

Posted: Fri Feb 11, 2011 1:18 am
by kirankumarreddydesireddy
Hi

I am trying to load date(along with time)from seqfile to Oracle table.

Source(Seq file) -Timestamp

Target (Oracle table) - Timestamp

I also want the time to be populated in target.

Source

2008-10-14 19:39:09.000

Expected Target

2008-10-14 19:39:09.000


Note :

Oconv(Iconv(Substrings(Extraction_Data.MODIFYDATE,1,10),'D-YMD'),'D-YMD') : Oconv(Iconv(Substrings(Extraction_Data.MODIFYDATE,11,19),'MTS'),'MTS')
works perfectly and I am able to load 2008-10-14 19:39:09 in target


Can anyone let me know how would we populate tthe expected date(along with timestamp) in target.


Thanks
Kiran

Posted: Fri Feb 11, 2011 3:18 am
by ray.wurlod
I don't know what you're asking here - you've asked how to do something then described a solution that works. You've also marked the question as relating to a server job yet posted it in the Enterprise Edition forum. This is like asking your greengrocer why your blood pressure is elevated.

Posted: Fri Feb 11, 2011 4:15 am
by kirankumarreddydesireddy
Hi Ray

I will be more specific.

Source

2008-10-14 19:39:09.679

Expected Target

2008-10-14 19:39:09.679


I am able to load data into target which is 2008-10-14 19:39:09
but not "2008-10-14 19:39:09.679"

The millisecond sholud be captured(.679)


Thanks
Kiran

Posted: Fri Feb 11, 2011 4:25 am
by priyadharsini
Is your job server or parallel?
If it is parallel then enable the microseconds checkbox in the extended properties and propogate till your target.

Posted: Fri Feb 11, 2011 4:26 am
by kirankumarreddydesireddy
FYI.We are using Datastage 7.5 server edition

Posted: Fri Feb 11, 2011 7:05 am
by chulett
And here we are.

The stage (or you) are using TO_DATE() to populate the target, I assume. Use TO_TIMESTAMP() instead.