Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a campaign whereby for each month a new table is created on my SQL database.
Example:
Month | Table name in SQL database |
---|---|
August | 201508_XXXXXXXX |
September | 201509_XXXXXXXX |
October | 201510_XXXXXXXX |
November | 201511_XXXXXXXX |
December | 201508_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 ID | Table name in SQL database |
---|---|
D1230258789 | 201508_XXXXXXXX |
D1230258789 | 201509_XXXXXXXX |
D1230258789 | 201510_XXXXXXXX |
D1230258789 | 201511_XXXXXXXX |
D1230258789 | 201512_XXXXXXXX |
Any idea how i can proceed.
Kind Regards,
Hasvine
Something like this:
Let vTable = Date(Today(), 'YYYYMM') & 'XXXXXX';
....
SQL
SELECT * From [$(vTable)];
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