Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have imported a field from a SQL database that contains nulls. I would like to assign a name to a new field based off of whether or not my original field is null or contains a value. This seems like a simple problem to solve using this code:
if(IsNull(field), 'string', 'string2') as field2
However, for some reason I'm getting the string2 in field2 for rows that have a null for field. Does anybody have an idea of why this is happening - or have a better way of accomplishing this bit of logic?
Thanks
Try
If(len(trim(field))=0, 'string','string2') as field2
perhaps you haven't a true null but a blank or some other char that seems null
so just use Colin answer
When QlikView displays "-" in a list does that mean that it is a null?
Try Alt(field, String) as field2;