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.
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.
I am using the Modify column action to change the date format using an expression format([COLUMN_NAME], "MM/dd/yyyy"), however, I have fields that are empty and result with an error in the field. I have tried ifempty and isempty and I cannot get the expression right,. Can you help? Many thanks!