I have the date value in the oracle source database table for the column(varchar datatype) I have value either as "0000/00/00 00:00:00" or "00/00/00 00:00:00".
When I select these records and try to insert into a target database table when I try to insert into the column(date datatype), I am getting error like invalide month.
My job looks like:
SourceOracleStage----->TransformerStage----->TargetOracelStage.
Can anyone of you suggest me how to insert a NULL value for the above two formats. Is there any generalized method where I can check if i have 0 date values then insert a NULL value?
Date format problem
Moderators: chulett, rschirm, roy
I would try stripping all of the non-numeric values and then check for zero:
(assuming no other transformations are needed)
Code: Select all
If DIGITS(Link.DateField) = 0 Then @NULL Else Link.DateField
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The first date is YMD order. Is the second date also YMD order? If not, what is the order of the day, month and year components, and have you informed Oracle that such is the case?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.