Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Where Field is Null not working

hello,

I have a table with articles, and each article has a code. this code is stored in another column.

ArticlesCode
Article 112345
Article 1
Article 1
Article 22345
Article 2

I try to only select the fields that have a code, but somehow I cannot select Null.

I tried this:

[FactuurNummerLeverancierTemp]:

LOAD

  invs1_ref as [DocumentNumber],

  invscs_order_no as [FactuurNummerLeverancier];

SQL SELECT * FROM INVS_DATA

WHERE INVS1_CO_SITE = '01'

  AND invscs_order_no IS NOT NULL

      AND INVS1_REC_TYPE = 2;

Not working.

I also tried len() > 0 in a resident load. nope

Please help.

Tags (3)
5 Replies
Not applicable

Re: Where Field is Null not working

I think I found the problem.

Each empty field contains a number of empty spaces.

'                                   '

How can I exclude them?

MVP
MVP

Re: Where Field is Null not working

Within a QV Load statement, you can use trim() function.

MVP
MVP

Re: Where Field is Null not working

Try len() with trim(), like:

Len(trim(invscs_order_no))>0

Employee
Employee

Re: Where Field is Null not working

Hi,

This is an SQL statement and is executed directly on the database.

'SELECT * FROM INVS_DATA 

WHERE INVS1_CO_SITE = '01' 

AND invscs_order_no IS NOT NULL 

AND INVS1_REC_TYPE = 2;'


Can you check the behaviour of the statement on your database using a SQL query tool?


Or, if you want to use the resident load after your initial SQL load, try Len( Trim( Field ) ) > 0.

Regards,

Brice

arthuriuxx
New Contributor

Re: Where Field is Null not working

I want select the values NULL and with the sentence "IS NULL" work fine

Community Browser