Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

WILDMATCH not working in WHERE clause?

A number of posts suggested that Wildmatch could be used in a WHERE clause. However, I am getting this error:

wildmatch.JPG

The syntax seems correct. Am I missing something?

4 Replies
dclark0699
Contributor

Re: WILDMATCH not working in WHERE clause?

Wildmatch is a Qlikview specific function and can only be used in the WHERE clause of a LOAD statement. Here you are using it in a SQL statement. Try replacing it with CH.REF LIKE 'Updated(1): Salesperson%'

Re: WILDMATCH not working in WHERE clause?

WildMatch() is a QlikView function, not a SQL function. The Select statement is sent in its entirety to the Database Management System, which doesn't recognize WildMatch.

You can use WildMatch() in a QlikView statement like LOAD, but not in a Select.

Peter

neetha_p
Honored Contributor

Re: WILDMATCH not working in WHERE clause?

hi kevin,

WildMatch() is a QlikView function,do not use filters in select statement,apply filters in load statement.


Load *

Where WILDMATCH(CH.REF, '*Updated(1): Salesperson%*') and ONDATE >= '01/01/2015';

Select * From ContHist;


Regards

Neetha


MVP
MVP

Re: WILDMATCH not working in WHERE clause?

if you want to use wildmatch, use Neehta answer, the rows are filtered in QlikView (all record from database, filter in Qlik)

if you want to filter at the database side use like (in SQL) and remove wildmatch (from the Qlik part)

Load *;

SQL

Select *

From ContHist

Where

     CH.REF like '%Updated(1): Salesperson%'

     and ONDATE >= '01/01/2015'

;



Community Browser