DateTime error

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
mannoo19
Participant
Posts: 6
Joined: Mon May 31, 2004 10:59 am

DateTime error

Post by mannoo19 »

Hi all,,
I am loading data from an oracle table to another oracle table...
For date , i am using the derivation as:
If Trim(DSLink21.WORK_ORDER_CRE_DT) = '' Then @NULL Else oconv(Iconv(DSLink21.WORK_ORDER_CRE_DT,"D"),"D-YMD[4,2,2]") : " " : " "

It gives me the error:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0...
Why is that so??? Looking at my data in the source, I cannot see anything wrong ..
can someone suggest whats going on...
Thanks...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Simplest thing to do is replace your target Oracle stage with a Sequential File stage and write things out to a flat file. What does it look like there?

Keep working the job until the output looks correct, then hook the OCI stage back up.

ps. I personally find it "best" to work with Oracle dates as Timestamps in DataStage. You then explicitly control the time portions of the dates, setting them to all zeroes if required.
-craig

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