Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

marksmunich
Contributor II

Wildcard match with 'like'

Hi Community,

Can i Use Like with Wildcard where i do not speciy any characters but just Wildcard match Format

example :

Load

field1,

field2

From Table1 Where Field1 like '?????-????-*' ;

in the above example the the Patterns which i Need to load must be something like  ghfds-fdsd-sdds or dsasdf-fgds-sd

The table contains more than 50000 rows. this Special pattern which has 5 characters in the begining and then a '-' 4 characters and then '-' and followed by any characters. This pattern indicates a product category. so i want to load this pattern.

thanks

Mark

Tags (2)
3 Replies
MVP
MVP

Re: Wildcard match with 'like'

may be with wildmatch

where

     wildmatch(Field1, '?????-????-*')

;

from online help

wildmatch( str, expr1 [ , expr2,...exprN ] )

The wildmatch function performs a case insensitive comparison and permits the use of wildcard characters ( * and ?) in the comparison strings.

Example:

wildmatch( M, 'ja*','fe?','mar')

returns 1 if M = January

returns 2 if M = fex

Employee
Employee

Re: Wildcard match with 'like'

i ran a couple of tests and it seems to work .   * and ? are acceptable wildcards.

Did you get an error ?

marksmunich
Contributor II

Re: Wildcard match with 'like'

Ist working now. There was a small mistake, fixed it...

Community Browser