Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Excluding records with symbols

Hello,

I am loading data from a database but since there is alot of records i want to filter the records that contain a symbol.

The following symbols i want to exclude:

*, /, #

I tried the following:

[Example]:

LOAD

     [KeyPart]

SQL SELECT

FROM Database

WHERE [KeyPart] NOT LIKE '*'

Tags (3)
4 Replies
MVP
MVP

Re: Excluding records with symbols

Try something like this:

[Example]:

LOAD

     [KeyPart] ;

SQL SELECT  [KeyPart]

FROM Database

WHERE Not (Instr([KeyPart], '*') Or Instr([KeyPart], '/') Or Instr([KeyPart], '#'));

Edit: Corrected some basics

Not applicable

Re: Excluding records with symbols

try this

[Example]:

LOAD

     [KeyPart]

WHERE not match([KeyPart], '*','/','#');

SQL SELECT

FROM Database;

Not applicable

Re: Excluding records with symbols

I am using an Informix database and with both solutions I get an OCBD db error

Re: Excluding records with symbols

Try with this

[Example]:

LOAD

     [KeyPart]

SQL SELECT

FROM Database

WHERE [KeyPart] NOT LIKE '\*'

Can you tell me these symbols are part of a string? if so use WHERE [KeyPart] NOT LIKE '%\*%'

Community Browser