Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
i have been facing an issue where i am trying to exclude the records by using <> , not match, not wildmatch functions in the where clause. But none of them are actually excluding them.
Please provide us the suggestion to fix these issue.
LOAD
field1,
field2
From < Filename>
where
not WildMatch (element,'*aaa*','*bbb*'); [first option]
element <> 'aaa' or element <> 'bbb' [second option]
not Match (element,'*aaa*','*bbb*') [third option]
Thanks in advance,
I think these 2 option should work if you want to only exclude aaa bbb
- not match(field, 'aaa', 'bbb')
- field <> 'aaa' and field <> 'bbb'
S:
load * inline [
field
aaa
bbb
123aaa456
123bbb456
ccc
cac
caac
]
where
//field <> 'aaa' and field <> 'bbb'; // option1
not Match(field, 'aaa', 'bbb'); // option2
If you want to exclude *aaa* and *bbb* try
not (field like '*aaa*' or field like '*bbb*')
not WildMatch(field, '*aaa*', '*bbb*')
I tried second option, it's not getting excluded
this is the result of the script
load *, 1as field2 inline [
field
aaa
bbb
123aaa456
123bbb456
ccc
cac
caac
]
where
not Match(field, 'aaa', 'bbb');
aaa bbb are excluded