Timestamp issue inserting into Oracle table from flat file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kirankumarreddydesireddy
Participant
Posts: 110
Joined: Mon Jan 11, 2010 4:22 am

Timestamp issue inserting into Oracle table from flat file

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kirankumarreddydesireddy
Participant
Posts: 110
Joined: Mon Jan 11, 2010 4:22 am

Post 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
priyadharsini
Participant
Posts: 40
Joined: Mon May 11, 2009 12:19 am
Location: Madurai

Post 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.
kirankumarreddydesireddy
Participant
Posts: 110
Joined: Mon Jan 11, 2010 4:22 am

Post by kirankumarreddydesireddy »

FYI.We are using Datastage 7.5 server edition
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And here we are.

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

"You can never have too many knives" -- Logan Nine Fingers
Post Reply