Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am reading data from a qvd and try to filter out the data by using Where Not WildMatch statement like this:
Where NOT WildMatch(Type,'*W0*','*W1*','*W2*','*W3*','*W4*','*W5*','*W6*','*WA*','*WL*','*LLU*','*LLX*','*P0*','*PG*','*IPA*','*IP1*','*IP2*')
Why do you think this is happening?
Thanks pradosh,
Unfortunately, this one doesn't make any changes either. When I test the expressions in the frontend, the result is as it's expected but in the load statement I don't see any improvements.
Maybe try with different variations of the same string with '.' in it? i.e. instead of '*LLU*', try:
'*.LLU.*'
'*.LLU*'
'*LLU.*'
Maybe the dot is messing up the search phrases.
Also, does it make a difference when you just use one of the values?
Try
Where NOT WildMatch(Type,'*LLU*')
If that works, it could be a problem with the combination in the expression
Just tested this one! no luck!!
Do you know ant other ways of filtering out those values considering the fact that I'm doing a resident load
and don't have access to the database.
You are doing a resident LOAD? You were telling us that you are loading from a QVD.
If you do a resident LOAD, how does your script look like? Maybe you are performing auto-concatenation, and what you see are the original table values. That would explain why you think your filter does not work.
The next thing I'd try is to include the evaluation as a field in the table:
TempTable:
LOAD
CustNo,
CustGroup,
Order,
Type,
Date,
Time,
WildMatch(Type, '*W0*', '*W1*', '*W2*', '*W3*', '*W4*', '*W5*', '*W6*', '*WA*', '*WL*', '*LLU*', '*LLX*', '*P0*', '*PG*', '*IPA*', '*IP1*', '*IP2*') as Test,
If(WildMatch(Type, '*W0*', '*W1*', '*W2*', '*W3*', '*W4*', '*W5*', '*W6*', '*WA*', '*WL*', '*LLU*', '*LLX*', '*P0*', '*PG*', '*IPA*', '*IP1*', '*IP2*')>0,1,0) as Test2
FROM [lib://Path\Orders.qvd]
(qvd);
Even at this point, you'll be able to see the table how QV will see it - so will be quite useful if you could attach a screenshot of the table with the Type, Test, and Test2 fields in it.
And then do a resident load with a filter based on 'Test' or 'Test2':
NoConcatenate
Table:
LOAD *
Resident TempTable
WHERE Test <1;// or WHERE Test2 = 0
DROP TABLE TempTable;