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.

Not applicable

New to QVD creation; need to "store" combined tables

I have a script which concatenates data from 5 different Loads (tbl_MAIN).  After concatenating these tables I load another table (tbl_USER) to  join to these concatenated  tables (on UserId).    In the app I can create a Straight Table Chart which shows the combined data, but I want to create an .xls or .csv in the script that can be saved/stored automatically that has all the data combined.  How do I do this?

Thanks!

5 Replies
prieper
Honored Contributor II

Re: New to QVD creation; need to "store" combined tables

You need to JOIN the tables and then export as .csv (STORE).

HTH Peter

karthikmungi3
Contributor III

Re: New to QVD creation; need to "store" combined tables

At the end of script write:

STORE tbl_MAIN to tbl_MAIN.xls;

Not applicable

Re: New to QVD creation; need to "store" combined tables

Peter, perhaps I'm doing the Join incorrectly, but when I put JOIN between each of the loads/selects I get a much larger table that doesn't appear to be joined on the primary keys (common fields).  Suggestions?

Re: New to QVD creation; need to "store" combined tables

Primary keys? Didn't you just mention that the concatenated table (tbl_Main) will be joined to tbl_USER on user ID (One field)?

I feel that Join on field should not multiply your data. Assuming tbl_Main has User ID as the foreign key and has repetition of User ID, the final table you get after joining the two table should have the same number of rows as your tbl_Main. Don't quote me on this, but this is based on my understanding and I may be totally incorrect. If you can share some information related to number of rows in tbl_Main, tbl_User and the resulting table, then that might throw some light on the issue.

Best,

S

MVP & Luminary
MVP & Luminary

Re: New to QVD creation; need to "store" combined tables

Hi Dan,

Check whether they is common field names in both the tables (UserId), if this is not the case then it will become CrossJoin, or you need to need to rename the column to UserId if field name is different in one of the table.

For storing the table into CSV you can use this

STORE TableName INTO FileName.csv (txt);

Hope this helps you.

Regards,

Jagan.