Null Handling Functions

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
rajasingam
Participant
Posts: 8
Joined: Thu Feb 21, 2008 4:22 am

Null Handling Functions

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
pavuluri
Participant
Posts: 4
Joined: Sat Dec 15, 2007 4:24 am

Post by pavuluri »

if isnull(particular coloumn) then setnull()
else
particular column
pavuluri
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The column is coming in as empty, not NULL so the IsNull() function will never evaluate to true.
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post 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
Post Reply