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

QVD load and WHERE clause

There's something wrong with my syntax here in the WHERE clause, but i can't work it out

Activities:

load * from [\\fsdata01\department\eCommerce\BIU\Dataloads\Salesforce\QVDs\Activities.qvd] (qvd)

WHERE Activities.Type NOT LIKE ('Email','Minor communication')  AND Subject NOT NULL;

1 Solution

Accepted Solutions
avinashelite

try like this:

Activities:

load * from [\\fsdata01\department\eCommerce\BIU\Dataloads\Salesforce\QVDs\Activities.qvd] (qvd)

Where not WildMatch(Activities.Type,'Email','Minor communication') AND len(trim(Subject))>0 ;

;

View solution in original post

7 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

NOT keyword should negate a comparison.

Try your WHERE like this:

WHERE Not (Activities.Type LIKE '*Email*') AND Not (Activities.Type LIKE '*Minor communication*')  AND Not IsNull(Subject);


Note that QlikView LOAD statements may look like SQL SELECT statements, but they are not identical.


Best,


Peter

avinashelite

try like this:

Activities:

load * from [\\fsdata01\department\eCommerce\BIU\Dataloads\Salesforce\QVDs\Activities.qvd] (qvd)

Where not WildMatch(Activities.Type,'Email','Minor communication') AND len(trim(Subject))>0 ;

;

Anonymous
Not applicable
Author

Alex,  You could also have a look at the Match() function.  Will do the same as Peter's suggestion, but with a touch less typing to do.

Not applicable
Author

Avinash, the rows I am wish to excluded are still being loaded for some reason, except that the Subject and Type are coming through as blank.

I need the rows totally excluded from the load

avinashelite

Try like this :

Activities:

load * from [\\fsdata01\department\eCommerce\BIU\Dataloads\Salesforce\QVDs\Activities.qvd] (qvd)

Where not WildMatch(Activities.Type,'*Email*','*Minor communication*') AND len(trim(Subject))>0 ;

or

Activities:

load * from [\\fsdata01\department\eCommerce\BIU\Dataloads\Salesforce\QVDs\Activities.qvd] (qvd)

Where not WildMatch(upper(Activities.Type),'*EMAIL*','*MINOR COMMUNICATION*') AND len(trim(Subject))>0 ;

avinashelite

c.png

Not applicable
Author

My mistake avinash. The ID was being loaded from another table

you were right first time!