IF NULL leave blank

I have a CSV File that has some columns who’s values are blank, I want to leave blank not null. how do I do this.
If this was SQL I’d use a case statement:
CASE WHEN condreaid IS NULL THEN ‘’
ELSE condreaid END AS ‘condreaid’
OR
ISNULL(condreaid,’’) AS ‘condreaid’
The default tool is leaving them NULL

what is the EasyMorph method of doing this within the CSV task. the source file is a COMMA DELIMITED CSV file.

Hi Ronald and welcome to the Community!

You can use the “Modify column” action with the following expression:

if( isempty([condreaid]), '', [condreaid])

or even simpler

ifempty([condreaid], '')

If all values in [condreaid] are supposed to be text, then you can use the “Convert data types” action in the “Everything to text” mode - it will replace nulls (empty values) with empty strings. The action can be a convenient way to replace nulls with empty strings in multiple columns at once.

1 Like

thank you very much. This worked.
I spoke today with Matthew and he hopes to get back to me about some final items we need.

Sincerely,

Hi Dmitry

I have a few columns where I want to replace null to 0.
Do I need to modify each column as I cannot see how replace table wide can work?

i.e. ifempty([Apr],0) and then ifempty([May],0) ...

Or is the answer to unpivot and replace and pivot again?

Thanks

Hi Rykie,

check out this topic: Replace in multiple columns

1 Like

Thanks, Dmitry.