Null issue in Date data type

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

Post Reply
chrisjones
Participant
Posts: 194
Joined: Thu May 11, 2006 9:42 am

Null issue in Date data type

Post by chrisjones »

Hi ,
I am trying to insert null in Date field in Oracle table which is nullable field, but somehow datastage or oracle is inserting '30-Dec-01' value instead of null.can any one suggest and help me how to keep in the null value in the date field.
Thanks,
Chris Jones
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Re: Null issue in Date data type

Post by soumya5891 »

Does the date field coming out from a join ?
Soumya
chrisjones
Participant
Posts: 194
Joined: Thu May 11, 2006 9:42 am

Re: Null issue in Date data type

Post by chrisjones »

Thanks for your reply..

it is coming from lookup...
Thanks,
Chris Jones
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Oracle supports a 'default value' but you need to not mention the column in your sql for it to be applied, if you specifically pass a null to the column it will be set to a null.

To me that means it is coming from your job, somewhere in there a default value is being applied.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jyothisdasms
Participant
Posts: 33
Joined: Wed May 19, 2010 12:15 am
Location: Pune

Post by jyothisdasms »

I think your Look Up is not returning the null value when the join condition is not matching.Is the date field is coming from reference ?Check whether the nullability is set to 'Y' in look up for that field.
" Dream like you will live forever, live like you will die today."
soumya.buna
Participant
Posts: 3
Joined: Tue Apr 01, 2008 7:15 am
Location: Hyderabad

Re: Null issue in Date data type

Post by soumya.buna »

check somewhere in column level properties default value has been set to the value which you are finding for the field.
Soumyaranjan Mohaptra
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

two possibilities:

1) your job is fetching the date mentioned instead of NULL from the look up

2) a default value for the column has been defined at the database lever

Replace the database stage and put a seq file stage and check what value datastage is fetching, is it a NULL or the date you mentioned.

If it is fetching a NULL then check if there is a dafault value specified at the table level.
Post Reply