Page 1 of 1

Null Handling Functions

Posted: Tue Mar 18, 2008 1:37 am
by rajasingam
Hi friends,

My Input Source

Id,Name,Age
A1307420,Arun,25
A1307421,Venkat,26
A1307422, ,27

In the third row Second column I have a Space which is a null value, I need an Output as follows Using Transformer stage especially using Null handling functions like Isnull, Isnotnull, Nulltovalue, etc.

Id,Name,Age
A1307420,Arun,25
A1307421,Venkat,26
A1307422,Vignesh,27

Thanks in advance..

Regards
Rajasingam. :D

Posted: Tue Mar 18, 2008 2:02 am
by ArndW
How did "Vignesh" magically appear instead of the empty value? The text is coming back as empty, not NULL so none of the null handling routines are appropriate.

Posted: Tue Mar 18, 2008 3:07 am
by pavuluri
if isnull(particular coloumn) then setnull()
else
particular column

Posted: Tue Mar 18, 2008 3:19 am
by ArndW
The column is coming in as empty, not NULL so the IsNull() function will never evaluate to true.

Posted: Tue Mar 18, 2008 3:48 am
by hamzaqk
There is a space and not a null as ArndW mentioned, so cannot use functions such as isnull() here. based on your statement which says there is "a" space. you can check for that and code that in the if then else

Code: Select all

IF input.field ='' then This else That