Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
remo0017
Contributor II
Contributor II

not equal to operator in where Clause

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,

3 Replies
maxgro
MVP
MVP

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*')

remo0017
Contributor II
Contributor II
Author

I tried second option, it's not getting excluded

maxgro
MVP
MVP

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');

1.png

aaa bbb are excluded