Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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*';
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*';
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
Thanks! I'll give the WildMatch a try as well, always good to have options