Page 1 of 1

IsNull() notworking

Posted: Tue Jul 26, 2011 1:04 pm
by deva
Hi ,
I have file with 4 columns. one of the column is notnull and length is 12 char.

But sometimes null value may come to this column. So while reading I am making as varchar and nullable yes in the file and reading.

I want to reject that record while loading into database.
I am using constrain, IsNotNull(col2). I did len(col2) >0 aswell.
that column have the null value so that record should not load into databse. But It is loading. I didn't see any special char.

Posted: Tue Jul 26, 2011 1:54 pm
by jwiles
When you say that a null value sometimes comes in the column, what does that mean? What is your null value?

Sequential Files don't contain nulls, but they may contain values which represent nulls. You can define that value in the stage's format options, as described in the Parallel Job Developer Guide.

Regards,

Re: IsNull() notworking

Posted: Sat Jul 30, 2011 4:05 am
by hari_marthala
hi...

Sometimes...we confuse between null value and empty value. So check for empty value of that column
Ex: Trim(Input col)=''