Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

IS not NULL statement is not working in resident load

Hi,

I am using the below code:

[Division]:

//first 100;

load

distinct

"Trn Key",

    [Manager Wholesaler],

[Firm Channel Desc] & ' - ' & [Manager Name]  as [Division Name],

[Firm Channel Desc] & ' - ' & [Manager Name] & '_' & [Manager Wholesaler] as Division_Manager_Wholeseller

resident [Temp Stagging Table]

where

  [Firm Channel Desc],  [Division Name] IS not NULL;

but I am getting the error when I am using IS NOT NULL statement.

So is there any work around exists, so that I can use NULL checking here and not loading the NULL values.

Thanks,

Sandip

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Also have a look at the HELP for the correct syntax of IsNull():

IsNull ‒ QlikView

...

Where

Not IsNull(FieldA) and Not IsNull(FieldB);

Or use

...

Where

Len(Trim(FieldA)) and Len(Trim(FieldB));

instead to handle NULL or empty spaces only field values.

View solution in original post

6 Replies
rahulpawarb
Specialist III
Specialist III

As a workaround, you can add below condition:

Where Len([Division Name]) > 0;

//or

Where IsNull([Division Name]) = 0;

Regards!

Rahul Pawar

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Ok

not entirely clear - are you looking to compare [Firm Channel Desc] AND [Division Name]? If so, try this:

NOT IsNull([Firm Channel Desc]) AND NOT IsNull([Division Name])

tripatirao
Creator II
Creator II

Dear 

add

[Firm Channel Desc],

[Division Name],

and try once

[Division]:

//first 100;

load

distinct

"Trn Key",

[Firm Channel Desc],

[Division Name],

    [Manager Wholesaler],

[Firm Channel Desc] & ' - ' & [Manager Name]  as [Division Name1],

[Firm Channel Desc] & ' - ' & [Manager Name] & '_' & [Manager Wholesaler] as Division_Manager_Wholeseller

resident [Temp Stagging Table]

where

  [Firm Channel Desc],  [Division Name] IS not NULL;

Regards

Tripati

swuehl
MVP
MVP

Also have a look at the HELP for the correct syntax of IsNull():

IsNull ‒ QlikView

...

Where

Not IsNull(FieldA) and Not IsNull(FieldB);

Or use

...

Where

Len(Trim(FieldA)) and Len(Trim(FieldB));

instead to handle NULL or empty spaces only field values.

ananyaghosh
Creator III
Creator III
Author

Can I use this as:

Where

Len(Trim(FieldA))>0 and Len(Trim(FieldB)) >0;

or if I use Len(Trim(FieldA)) and Len(Trim(FieldB)); - it will automatically handle the empty values in the field means does not load the rows from those fields that hold the empty values?

swuehl
MVP
MVP

Both lines should be equivalent.

But you need to define if you want to remove all records where both field values are empty / NULL or where at least one of the field values is empty / NULL. Change the AND to OR then.