3 Replies Latest reply: Mar 10, 2016 10:16 AM by Alec Smith RSS

    Where WildMatch Not Working

    Alec Smith

      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');

        • Re: Where WildMatch Not Working
          Gysbert Wassenaar

          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')

          ;

          • Re: Where WildMatch Not Working
            Stefan Wühl

            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