IncLotsHashToTable..Dstage: ORA-01400: cannot insert NULL in

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
ysrini9
Participant
Posts: 108
Joined: Tue Jul 12, 2005 2:51 am

IncLotsHashToTable..Dstage: ORA-01400: cannot insert NULL in

Post by ysrini9 »

Hi All,

Our Datastage jobs are got aborted couple of days becuase of this below problem.

IncLotsHashToTable..Dstage: ORA-01400: cannot insert NULL into coulmns

but As this is a not null column and since null values are trying to get inserted we are facing this problem.

in that column we did constraint level not(isnull(...like that)
even jobs are getting aborted.
How to solve this problem
Regards
srini
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

in that column we did constraint level not(isnull(...like that)
even jobs are getting aborted.
Can you paste what derivation you provided in this column. and also constraint are not column level they are set at the row level.
Success consists of getting up just one more time than you fall.
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Oracle will interpret an empty string ('') as NULL. In DataStage an empty string is just an empty string.

Mike
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

for null check for isnull() = 0 and for empty string use the len() function. By those two functions you can handle it.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ysrini9
Participant
Posts: 108
Joined: Tue Jul 12, 2005 2:51 am

Notnull coulmn trying to insert null

Post by ysrini9 »

Hi
we are using Constriant like

Linkname.coulmnname =0 OR Linkname.coulmnname =0 Or Linkname.coulmnname =0

is this way is possible to handle nullvalues into notnull column.

Regards
srini

Mike wrote:Oracle will interpret an empty string ('') as NULL. In DataStage an empty string is just an empty string.

Mike
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Re: Notnull coulmn trying to insert null

Post by DSguru2B »

ysrini9 wrote:Hi
Linkname.coulmnname =0 OR Linkname.coulmnname =0 Or Linkname.coulmnname =0
That will not handle nulls. If you want to filter out the null values you need something like

Code: Select all


ISNULL(Linkname.coulmnname1) = 0 OR LEN(trim(Linkname.coulmnname1)) <> 0 AND ISNULL(Linkname.coulmnname2) = 0 OR LEN(trim(Linkname.coulmnname2)) <> 0 AND .....<so on>
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply