Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Sirs ,
I am not understand the wrong with below code . All i want to remove certain rows while loading fro qvd . But where conition not working .
Table1:
LOAD * INLINE [
A1, B1, C1
Unkown, QX, 5001
Unkown, 1A, 5001
Unkown, 2A, 5001
AB1, 3A, 5001
AB2, 4A, 5001
AB3, 5A, 5001
AB4, 1A, 5001
AB5, QX, 5001
AB6, QX, 5002
AB7, 1A, 5003
AB8, 2A, 5004
AB9, 3A, 5005
Unkown, 4A, 5006
Unkown, 5A, 5007
AB12, 1A, 5008
AB13, QX, 5009
AB14, QX, 5010
AB15, 1A, 5011
AB16, 2A, 5012
AB17, 3A, 5013
AB18, 4A, 5014
AB19, 5A, 5015
AB20, 1A, 5016
AB21, QX, 5017
Unkown, QX, 5018
Unkown, 1A, 5019
AB24, 2A, 5020
AB25, 3A, 5021
];
STORE Table1 into C:\Users\xxxxxxx\Desktop\xxxxxxx\xxxxxxxxxx\Table1.qvd ;
DROP Table Table1 ;
Table2:
LOAD A1,
B1,
C1
FROM
(qvd) Where not WildMatch(A1,'Unkown') or not WildMatch(B1,'QX') ;
Please help sir .
Hi,
The last where has an error. Try this one:
Table2:
LOAD A1,
B1,
C1
FROM
[Table1.qvd]
(qvd) Where not(WildMatch(A1,'Unkown')) and not(WildMatch(B1,'QX')) ;
Hi,
The last where has an error. Try this one:
Table2:
LOAD A1,
B1,
C1
FROM
[Table1.qvd]
(qvd) Where not(WildMatch(A1,'Unkown')) and not(WildMatch(B1,'QX')) ;
One more way you can do this is as below:
Table2:
LOAD A1,
B1,
C1
FROM
Where Not (A1 = 'Unkown' or B1 = 'QX') ;
pls use this and let me know your requirement meeting
Where not WildMatch(A1,'Unkown') and not WildMatch(B1,'QX') ;
and not(WildMatch(B1,'QX')) ;
Why and , i want to remove only those rows which have either Unknown is field A1 or QX in Field B1 .
(qvd) Where not(WildMatch(A1,'Unkown')) or not(WildMatch(B1,'QX')) ; --- > This did not work
In A1 field we can have Values like UnkownPerson,UnknownID etc , so i needed wildmatch
i am really confussed .. can please someone explain ? I know , if might be missing something very silly
Because you only want to load that rows that confirms that A1 is not 'Unkown' and B1 is not 'QX'. Remember that you are using the logic in a Negative way.
Imagine that we have the following line:
A1, B1, C1
Unkown, 1A, 5001
OR Logic (A1 is not 'Unkown' or B1 is not 'QX') : A1 is 0 (denied), B1 is 1 (accepted). 0 or 1 is 1 (line accepted)
AND Logic (A1 is not 'Unkown' and B1 is not 'QX') : A1 is 0 (denied), B1 is 1 (accepted). 0 and 1 is 0 (line denied)
I expect that this helps to understand the logic.
Thank you so much , This helps .
What if i had to delete only those records whose A1=Unknown and B1=QX ? What had been logic ?
once you used filter in the where condition its "omitted or deleted" and only retrieve the specific record required