Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QVD Where Clause WHERE NOT

Howdy!

So I am loading data from a QVD and I want to exclude rows if either one or both of these are true: ITEM_NBR LIKE '%PLT%' or INV_ITEM_ID LIKE '%MISC%'.  It seems that NOT LIKE doesn't work when loading from a QVD?

Directory;

ORDERS:

LOAD

     ORDER_NO,

     ITEM_NBR,

     ITEM_QTY,

     ITEM_COST,

     ITEM_DESC,

     ITEM_CLASS

FROM

[..\ORDERS_*.QVD]

(qvd)

WHERE

     AND ITEM_NBR NOT LIKE '%PLT%'

     AND INV_ITEM_ID NOT LIKE '%MISC%'



What are my options and does it tell me somewhere what the QVD LOAD where clause differences are?  I'm sure it's something silly that I'm missing but drawing a blank here...


Thanks!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try like this

Directory;

ORDERS:

LOAD

     ORDER_NO,

     ITEM_NBR,

     ITEM_QTY,

     ITEM_COST,

     ITEM_DESC,

     ITEM_CLASS

FROM

[..\ORDERS_*.QVD]

(qvd)

WHERE

     NOT ITEM_NBR LIKE '*PLT*'

     AND NOT INV_ITEM_ID LIKE '*MISC*';


View solution in original post

3 Replies
swuehl
MVP
MVP

Try like this

Directory;

ORDERS:

LOAD

     ORDER_NO,

     ITEM_NBR,

     ITEM_QTY,

     ITEM_COST,

     ITEM_DESC,

     ITEM_CLASS

FROM

[..\ORDERS_*.QVD]

(qvd)

WHERE

     NOT ITEM_NBR LIKE '*PLT*'

     AND NOT INV_ITEM_ID LIKE '*MISC*';


Sokkorn
Master
Master

Hi Sir,

Found something wrong in your where clause. Let try this:

Directory;

ORDERS:

LOAD

     ORDER_NO,

     ITEM_NBR,

     ITEM_QTY,

     ITEM_COST,

     ITEM_DESC,

     ITEM_CLASS

FROM

[..\ORDERS_*.QVD]

(qvd)

WHERE Not WildMatch(ITEM_NBR,'*PLT*') and Not WildMatch(INV_ITEM_ID,'*MISC*');

Regards,

Sokkorn

Not applicable
Author

Thanks!  I'll give the WildMatch a try as well, always good to have options