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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Where does the STORE statement go in the script?

I have an inherited long SQL statement that pulls from many files. I would like to store the results in a QVD file. Since there is no documentation on the SQLstatement, and there is no "INTO" in the Select statement, I looked at QV's table viewer, and saw the results were in a single table, "Sub_Package".

So, my question is: where do I put the following STORE statement:

STORE Sub_Package INTO SPData.qvd;

When I put it before the SQL statement, I get an error "No such table Sub_Package", and when I put it after the SQL statement's final clause (GROUP BY fields ORDER BY fields), I get a syntax error.

Do I need to put some terminator, eg. (;) at the end of the ORDER BY statement? Or is there some other syntax I'm missing here?

Thanks,

Kevin

2 Replies
MayilVahanan

Hi

     After your load statement finished.. Use store like below:

     Store Sub_Package into SPData.qvd(qvd);

     For example:

    

T1:

SELECT NO,
    "FirstName",
    "LastName"
FROM TableName WHERE DELFLAG = 0;

STORE T1 INTO QVD\Tablename.qvd(qvd);

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Yes, in the meantime I tried inserting a ";" after the GROUP BY in the Select, and it worked fine. Thanks for your help.