Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
khaycock
Contributor

Creating Snapshots of data

I have a few tables of data within my script that I would like to generate snapshots of on a monthly basis and store it in a separate qvd. The reload currently runs daily but I would only need the snapshot of data say on the 25th of each month. 

I've tried setting a version and then concatenating it into a qvd but it just overwrites the data rather than adding to it (see the code below) 

FINAL:
LOAD *,
// monthname(addmonths(today(),+1)) as Version
// monthname(today()) AS Version
date(today()) AS Version
// date(today()) as Version
RESIDENT FACT_FINAL1;
Drop table FACT_FINAL1;

Concatenate(FINAL)
LOAD *
FROM
[..\..\Data\QVDs\VulnerabilitiesSnapshot.qvd]
(qvd);

STORE FINAL into ..\..\Data\QVDs\VulnerabilitiesSnapshot.qvd (qvd);

Any ideas on the best way to do this?

Labels (2)