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

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

Re: QVD load and WHERE clause

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 ;

;

7 Replies

Re: QVD load and WHERE clause

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

Re: QVD load and WHERE clause

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 ;

;

Re: QVD load and WHERE clause

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

Re: QVD load and WHERE clause

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

Re: QVD load and WHERE clause

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 ;

Re: QVD load and WHERE clause

c.png

Not applicable

Re: QVD load and WHERE clause

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

you were right first time!

Community Browser