Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

asmithbi
Not applicable

Where WildMatch Not Working

Hello,

The following simple load statement is failing at the Where WildMatch with an "END-OF-STATMENT was not valid" error (see attached error message). 

I know this is a very simple load statement.  Does the fact that I'm connected to an IBM AS400 have something to do with the error?

Thank you in advance for any help on this!

LIB CONNECT TO 'iSeries400 (TestSystem)';

LOAD

    SID,

   SPROD As Item,

   SORD AS ShopOrder,

   SCOM As SOComment;

SQL SELECT * FROM S1018F1G.PQLIKLIB.FSO

Where WildMatch(SCOM,'3552','3537','3538');

Tags (2)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Not applicable

Re: Where WildMatch Not Working

Wildmatch is a Qlik Sense function. Your database does not speak Qlik script so it returns an error. You can try a preceding load:

LOAD

    SID,

   SPROD As Item,

   SORD AS ShopOrder,

   SCOM As SOComment

Where WildMatch(SCOM,'3552','3537','3538');

SQL SELECT * FROM S1018F1G.PQLIKLIB.FSO

;

Or something that any sql database should understand:

LOAD

    SID,

   SPROD As Item,

   SORD AS ShopOrder,

   SCOM As SOComment;

SQL SELECT * FROM S1018F1G.PQLIKLIB.FSO

WHERE SCOM IN ('3552','3537','3538')

;


talk is cheap, supply exceeds demand
3 Replies
Gysbert_Wassenaar
Not applicable

Re: Where WildMatch Not Working

Wildmatch is a Qlik Sense function. Your database does not speak Qlik script so it returns an error. You can try a preceding load:

LOAD

    SID,

   SPROD As Item,

   SORD AS ShopOrder,

   SCOM As SOComment

Where WildMatch(SCOM,'3552','3537','3538');

SQL SELECT * FROM S1018F1G.PQLIKLIB.FSO

;

Or something that any sql database should understand:

LOAD

    SID,

   SPROD As Item,

   SORD AS ShopOrder,

   SCOM As SOComment;

SQL SELECT * FROM S1018F1G.PQLIKLIB.FSO

WHERE SCOM IN ('3552','3537','3538')

;


talk is cheap, supply exceeds demand
swuehl
Not applicable

Re: Where WildMatch Not Working

Everything from SQL to semicolon will be send to the DBMS and executed by the external data source.

Guess that WildMatch() is not a valid AS400 function then

asmithbi
Not applicable

Re: Where WildMatch Not Working

Thank you Gysbert! 

Your first suggestion worked well. 

LOAD

    SID,

   SPROD As Item,

   SORD AS ShopOrder,

   SCOM As SOComment

Where WildMatch(SCOM,'3552','3537','3538');

SQL SELECT * FROM S1018F1G.PQLIKLIB.FSO

;