I need your help on my problem.
I have "Table1" that reloads and is stored into a qvd daily. I would like to copy "Table1" and store into a qvd again but on the first of every month.. (Similar to a snapshot)
?? IF first day of month , Store "Table1" to qvd. ??
I also would like to add to "Table1" the month it stores the data as a field if possible?
On the 1st April "Table1" is stored to (QVD) April2019.qvd; - including the field [StoreDate] = 01/04/19 for every row maybe?
I would suggest a more robust approach. What happens if you forget to run the script the 1th of the month or if the server is down? The script below will store the file the first time I its run during a month.
Let vMonth = text(date(today(), 'MMMMYYYY'));
today() as SnapshotDate
WHEN IsNull(QvdCreateTime('$(vMonth).QVD') store $(vMonth) into $(vMonth).QVD (qvd);
Thanks for your suggestion but sadly does not work.
I have tried it using Day(Today)=11 and it does not generate a qvd. Do you have any other ideas?
Also could you advise on how to get the Year&months in the name of the qvd ?
Thanks for your advice.
I dont think the syntax is correct here -> WHEN IsNull(QvdCreateTime('$(vMonth).QVD') store $(vMonth) into $(vMonth).QVD (qvd);
Could you help please?
An simple example with an autogenerated table.
Let vMonth = text(date(today(), 'MMMYYYY')); [$(vMonth)]: Load RecNo() as QVFactId, today() As SnapshotDate AutoGenerate 10; WHEN IsNull(QvdCreateTime('$(vG.QVDPath)$(vMonth).QVD')) store $(vMonth) into '$(vG.QVDPath)$(vMonth).QVD' (qvd);
@aaronnayan Do you get an errormessage using this script?