Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Question on loading null values

I recently took over an app that is using a perl script to pipe the data from the database to a text file.  For any null or undefined values from the db, the script gives the field a value of "-".  I know that null values are represented as "-" in Qlikview, but i have no idea why this script explicitly converts nulls to "-" in the data file.

My question:  is there risk to simply loading (if pipe is the delimiter) "||" instead of "|-|"?  Does Qlikview view that as being one and the same?  I want to switch over from text file loads to direct database loads, this is one of the differences i'm finding.



Tags (4)
3 Replies
Not applicable

Re: Question on loading null values

No, it's not the one and the same for QV. There is a difference between a value like '-' and NULL (and that's not only the case regarding QV), e.g. when counting field values.

If you have a close look into your app, you will probably find some places where there is taken care of the special char '-'.

But, you can probably adapt your app to handle also NULLs in your data model.

Not applicable

Re: Question on loading null values

Thanks.  There are actually many apps these qvd's are loaded into so i'd have to check all of them for logic.  What does a "-" mean when loaded to QV?  I know that it displays a "-" if there is no value in a chart for example, but i can't understand why anyone would want to load a "-" explicitly.

Not applicable

Re: Question on loading null values

If you have a literal hyphen "-" in your source file which represents a NULL value I would suggest to dump it in the source like you already have considered: empty value as "||" where pipe is delimiter instead of "|-|"

However, there is no risk to load NULL values directly from a database.