Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Import using "Where"

Hi

I'm trying to import a very large SQL table, however I'd like to limit the results by only returning lines with fields with a certain value, in this case "T".

This is my script, but it fails I have tried variations of this but don't seem to be getting it quite right, could anyone help?

LOAD "xxACC_REF",
"xxCODE_1",
"xxDATE",
"xxVALUE";
SQL SELECT "xxACC_REF",
"xxCODE_1",
"xxDATE",
"xxVALUE",
WHERE "xxVALUE" ='T'
FROM "xxMOVEMENTS";


An example of what I would like returned: -


xxACC_REFxxCODE_1xxDATExxValueRETURNED
123213412341212/12/10TYES
12342341234213431/05.09CNO
112434332455314/09/02VNO
45346534353213/06/00TYES


Thanks in advance

1 Solution

Accepted Solutions
javier_florian
Creator III
Creator III

Try with this script:

LOAD xxACC_REF,
xxCODE_1,
xxDATE,
xxVALUE;
SQL SELECT *
FROM "xxMOVEMENTS"

WHERE "xxVALUE" ='T';

View solution in original post

3 Replies
javier_florian
Creator III
Creator III

Try with this script:

LOAD xxACC_REF,
xxCODE_1,
xxDATE,
xxVALUE;
SQL SELECT *
FROM "xxMOVEMENTS"

WHERE "xxVALUE" ='T';

Peter_Cammaert
Partner - Champion III
Partner - Champion III

If your post contains your actual script code, you're very near to a solution:

  • remove the comma after your last field name in your SQL SELECT (immediately before the WHERE keyword)
  • put the WHERE clause BEHIND the FROM clause. You cannot reverse the order.

BTW Javier is spot on, and he was first.

Peter

Not applicable
Author

Thanks, I had actually just figured it out. Thanks to both of you