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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic merge of table

Hello All,

I have a campaign whereby for each month a new table is created on my SQL database.

Example:

MonthTable name in SQL database
August201508_XXXXXXXX
September201509_XXXXXXXX
October201510_XXXXXXXX
November201511_XXXXXXXX
December201508_XXXXXXXX

Now my problem is that I have created a QVW which pull data from the table 201508_XXXXXXXX and now the only way is to change the table in the load script every month.

Is there a way that I can do it dynamically.

Note that I have another table in my SQL database which link the table to the campaign id.

Campaign IDTable name in SQL database
D1230258789201508_XXXXXXXX
D1230258789201509_XXXXXXXX
D1230258789201510_XXXXXXXX
D1230258789201511_XXXXXXXX
D1230258789201512_XXXXXXXX

Any idea how i can proceed.

Kind Regards,

Hasvine

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Something like this:

Let vTable = Date(Today(), 'YYYYMM') & 'XXXXXX';

....

SQL

SELECT * From [$(vTable)];

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thank for your quick answer.

It works where I can load for the month of September but I cannot get the data of August.

Is there a way where I can load all the tables in my QVW please?

Thank you for your help.

Kind Regards,

Hasvine