Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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;

Tags (1)
1 Solution

Accepted Solutions
anbu1984
Honored Contributor III

Re: Do not load record with null field

For Not Null, try this

WHERE AccountId != NULL;

18 Replies
gabriel_kirst
Contributor III

Re: Do not load record with null field

You can try

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

Both on the where.

cspencer3
Contributor II

Re: Do not load record with null field

Try out 

Table:

Load *

RESIDENT OtherTable

Where IsNull(AccountId) <> -1

;

cspencer3
Contributor II

Re: Do not load record with null field

Upon testing the:

Where IsNull(AccountID) <> -1

seemed to work for me.

Not applicable

Re: Do not load record with null field

Didn't work. Got the error

"Invalid aggregate function IsNull"

Not applicable

Re: Do not load record with null field

Didn't work. Got the error

"Invalid aggregate function: IsNull"

MVP
MVP

Re: Do not load record with null field

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
Honored Contributor III

Re: Do not load record with null field

Can you post entire script

gabriel_kirst
Contributor III

Re: Do not load record with null field

Could you paste your load here?

Regards,

Gabriel

cspencer3
Contributor II

Re: Do not load record with null field

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

Community Browser