Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
subin6600
Creator III
Creator III

Do we have functions for 'Like' in Qlikview

I have some tables loaded into QVD's for optimising my existing reports.

But in the script i have Like Function many times as in

OR ABC NOT LIKE '%C.WD' 

OR ABC LIKE '%C.TD'

OR ABC LIKE '%C.LC'

OR ABC LIKE '%C.F%'

OR ABC LIKE '%F.WD');

Do we have any functions in wlikview that would work for the data that comes from a QVD??

for example i came across wildmatch but can anyone explain how can i use it well?

for suppose i have data abc,acd,bcda,cdae,efga,haij,cda,hika,olpa

I want all the words that has a in the starting :

I want all that words has a in any of the position in the word:

I want all that words that has a at the end:

Can anyone give me the syntax for them please...

6 Replies
swuehl
MVP
MVP

We do have a string operator 'like' in Qlikview...

From the help:

like

String comparison with wildcard characters. The operation returns a boolean true (-1) if the string before the operator is matched by the string after the operator. The second string may contain the wildcard characters * (any number of arbitrary characters) or ? (one arbitrary character). 

  Examples:

'abc' like 'a*' returns true (-1)

'abcd' like 'a?c*' returns true (-1)

'abc' like 'a??bc' returns false (0)

Not applicable

AddProdCategories:


I am trying to use the LIKE as well and it is not working in the below.  Any idea what I am doing wrong?. All values are assigned 0.

load distinct [Product Desc],

if(upper([Product Desc]) like '*INTEL *', 1,0) as PROD_INTEL,

if(upper([Product Desc]) like '*X86*', 1,0) as PROD_X86,

if(upper([Product Desc]) like '*SYSTEM X*', 1,0) as PROD_SYSX,

if(upper([Product Desc]) like '*ISS *', 1,0) as PROD_ISS,

if(upper([Product Desc]) like '*UNIX*', 1,0) as PROD_UNIX

resident Product;

swuehl
MVP
MVP

Seems to work for me:

load distinct [Product Desc],

  if(upper([Product Desc]) like '*INTEL *', 1,0) as PROD_INTEL,

  if(upper([Product Desc]) like '*X86*', 1,0) as PROD_X86,

  if(upper([Product Desc]) like '*SYSTEM X*', 1,0) as PROD_SYSX,

  if(upper([Product Desc]) like '*ISS *', 1,0) as PROD_ISS,

  if(upper([Product Desc]) like '*UNIX*', 1,0) as PROD_UNIX

INLINE [

Product Desc

intel asd

lIntel 123

mInTela

1yZX86sdf

Idx86a

iX87jd

LUNIX asd

syStem xY

BLISS .

KLIssTX86P

];

how does you field values look like?

davdiste
Partner - Creator
Partner - Creator

Hi, in script what is the correct  sintax for NOT LIKE 'ab*' ?

thx

avinashelite

You have the Product Desc data like the value your comparing ? please check the data once

swuehl
MVP
MVP

Davide Di Stefano wrote:

Hi, in script what is the correct  sintax for NOT LIKE 'ab*' ?

thx

NOT FIELDNAME LIKE 'ab*'