Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement where I have to replace blanks in the existing field values which has blanks with Null
(). For this requirement I'm using if( len(trim(CORP))=0, null(), CORP).
The above requirement works with single field, but I have to do the same thing for all the fields available in the data set. Can anyone help me how to replace blanks for the entire dataset's available across all fields with Null().
Thanks
Rahul
What you can do is to convert NULL value in the script
This code has to be before MyTable1:
Map_Nulls:
Mapping LOAD
NULL(),
‘<Unknown>’
AutoGenerate 1;
And this after MyTable1:
MAP FieldName, * using Map_Nulls;
You can use NullASValue like in Qlik. Try below in your script.
NullAsValue *;
OR
NullAsValue Field1, Field2, ...;
SET NullValue = 'Null';
LOAD *
FROM .....;
What you can do is to convert NULL value in the script
This code has to be before MyTable1:
Map_Nulls:
Mapping LOAD
NULL(),
‘<Unknown>’
AutoGenerate 1;
And this after MyTable1:
MAP FieldName, * using Map_Nulls;