Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Do not load record with null field

How can i adjust my load script to ensure the recorded without an AccountId are NOT loaded

Both these expressions kick up errors. What exactly am I doing wrong?

WHERE NOT IsNull(AccountId);

and

WHERE len(trim(AccountId))>0;

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

For Not Null, try this

WHERE AccountId != NULL;

View solution in original post

18 Replies
Anonymous
Not applicable
Author

You can try

WHERE IsNull(AccountId) = false() OR len(trim(AccountId))>0;

Both on the where.

cspencer3
Creator II
Creator II

Try out 

Table:

Load *

RESIDENT OtherTable

Where IsNull(AccountId) <> -1

;

cspencer3
Creator II
Creator II

Upon testing the:

Where IsNull(AccountID) <> -1

seemed to work for me.

Not applicable
Author

Didn't work. Got the error

"Invalid aggregate function IsNull"

Not applicable
Author

Didn't work. Got the error

"Invalid aggregate function: IsNull"

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Is this criterion in a SQL SELECT statement?

SQL SELECT ......

WHERE len(trim(AccountId))>0;


This does not work because this statement is executed on the database server, not by QV. Translate the statement to the SQL dialect of your server; eg for MS SQLS


SQL SELECT ......

WHERE AccountId IS NOT NULL;


HTH

Jonathan




Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
anbu1984
Master III
Master III

Can you post entire script

Anonymous
Not applicable
Author

Could you paste your load here?

Regards,

Gabriel

cspencer3
Creator II
Creator II

Yeah, as jonathan said,  if you are executing this in SQL this will definitely not work.