Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
whiteline
Master II
Master II

Inline load & null values

Hi.

Does anyone know another way of loading null() values with inline load ?

LOAD

if(NullField='NULL', null(), NullField) as NullField;

LOAD * INLINE [

NullField

1,

NULL,

2,

3

];

1 Solution

Accepted Solutions
marcelo_7
Creator
Creator

Set NullInterpret = '';

LOAD * INLINE [

NullField,

1,

,

3,

];

View solution in original post

4 Replies
Anonymous
Not applicable

I think this is the only way in case of inline load.  Leaving it blank returns blank that is not the same as null.

Regards,

Michael

hic
Former Employee
Former Employee

Michael is right. The inline Load is like a text file that cannot contain NULL values. See more on http://community.qlik.com/docs/DOC-3155.

HIC

marcelo_7
Creator
Creator

Set NullInterpret = '';

LOAD * INLINE [

NullField,

1,

,

3,

];

DylanUK
Contributor
Contributor

(I realise this is an old post - but I found a solution others may find useful)

You can add null values using concatenate inline loads, but a field must be specified in each load.  So a solution is:

LOAD * INLINE [
NullField, OtherField
1,
2,
3,
];
CONCATENATE LOAD * INLINE [
OtherField
1
];
DROP Fields OtherField;

 

I suspect for most cases other fields would exist - you would necessarily need to create (and drop) an 'OtherField'.