Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Thanks in advance!!!!
My requirement is that i have two variable vStartDate And vEndate,
For example I have pass date to these variables vStartDate = 04-05-2017 and vEndate = 08-05-2017.
and my query is
$(vTableName):
SQL
SELECT * FROM $(vTableName)
where DAY_KEY >= $(vStartDate)
and DAY_KEY <= $(vEndDate);
and it should store the data for each day in diffrent qvd for example:
$(vTableName)_04-05-2017.qvd
$(vTableName)_05-05-2017.qvd
$(vTableName)_06-05-2017.qvd
$(vTableName)_07-05-2017.qvd
$(vTableName)_08-05-2017.qvd;
One sample script here: https://community.qlik.com/message/8778#8778
Basically the syntax seem to be ok, however it always depends on the content of your variables (and the SQL-interpreter). Suggest to check the script without using variables and then adopt your variables for the required syntax. With our database we needed to convert dates into a string with the format YYYY-MM-DD.
for the second question:
STORE $(vTableName) INTO $(vTableName)_$(vStartDate).qvd (QVD);
should do. Probably you may have to hand over a directory for the saving-location.
Regards
Peter