Page 1 of 1

NullToEmtpy Issue

Posted: Thu Sep 02, 2010 8:45 pm
by highpoint
Hi,

I always seems to have problem with NullToEmpty function.

In the current scenario both all the source and target columns are varchar.

The NulltoEmpty does not work and seems to act differently in different jobs.

Code: Select all

If col1=100 then Nulltoempty(col2) else''
The below always work.

Code: Select all

If col1=100 and isnotnull(col2) then col2 else''


Are there any limitations with the use of nulltoempty function

Appreciate reply.

Posted: Thu Sep 02, 2010 9:43 pm
by ray.wurlod
The only limitation of which I am aware is that the target column must be VarChar data type.

Re: NullToEmtpy Issue

Posted: Fri Sep 03, 2010 3:19 am
by way246
The NulltoEmpty does not work and seems to act differently in different jobs.
[code]If col1=100 then Nulltoempty(col2) else''[/code]

The below always work.
[code]If col1=100 and isnotnull(col2) then col2 else''[/code]

Name Description Arguments Output
[b]IsNotNull[/b] Returns true when an expression does not evaluate to the null value any true/false (int8)
[b]NullToEmpty[/b] Returns an empty string if input column is null, otherwise returns the input column value input column input column

Posted: Fri Sep 03, 2010 6:09 am
by ray.wurlod
Please explain more fully, with examples, what "does not work" means in this context.