Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

LOAD Blank and Null values

<body><p>I am trying to load blank and null values into the QV load statement.  The 'disposition' value has blank and null values.  I am not sure of the correct syntax or if this can even be done.  I would like a 'list box' to be created that reduces the data based on the flag and dispositions criteria below. </p> <p>Basically the list box 'Orders' would contain one value called 'Display_Orders.'  An end user would then just need to select 'Display_Orders' and the below flags/dispositions would be applied. </p> <p><pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="plain"></p> <p> LOAD order_no ,complete, completed, quote_flag, disposition, if( quote_flag = 'N' AND disposition is 'NULL', //want this to be a NULL value; AND disposition = ' ', //want this to be blank projected_order; </p> <p><and> </and></p> <p></pre></p> <p>Let me know if you need anything else or have any other ideas about achieving this. </p> <p>Thanks for any help. </p> <p> </p> <p> </p></body>

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

If you are trying to assign a NULL value, use function null(). If you are trying to test for null, there is a function isnull(), but it was proven to return inconsistent results between 32 bit and 64 bit environments.

What most developers use to test for both nulls, empty values and any number of spaces is the following condition:

len(trim(FieldName)) = 0

cheers,

View solution in original post

3 Replies
tabletuner
Creator III
Creator III

Your current if statement filter is too strong. I think you want the if statement to be as follows:


if(quote_flag = 'N' AND (disposition is 'NULL' OR disposition = '' OR disposition = 'B' OR disposition = 'D' OR disposition = 'S'), 'Display_Orders') AS Orders


Is this of any help?

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

If you are trying to assign a NULL value, use function null(). If you are trying to test for null, there is a function isnull(), but it was proven to return inconsistent results between 32 bit and 64 bit environments.

What most developers use to test for both nulls, empty values and any number of spaces is the following condition:

len(trim(FieldName)) = 0

cheers,

Not applicable
Author

Thanks this worked Oleg.