Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP
MVP

Re: not equal to operator in where Clause

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

Highlighted
Contributor II
Contributor II

Re: not equal to operator in where Clause

I tried second option, it's not getting excluded

Highlighted
MVP
MVP

Re: not equal to operator in where Clause

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