Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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');
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')
;
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')
;
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
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
;