Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Renaming a file using maxdate for tracking

Hi

I have a question.

If  i have a file with transactions and i want to to use the maxdate function,, put it in a variable  .

and then use the data in this variable to rename the qvd file, that way i can keep track when was the latest transaction

and the file name will be changed only if there is new last transaction, how do i do that?

Thanks in advance

Paz

2 Replies
Peter_Cammaert

I think you're making it a bit too complex, but that may be because of my limited view on your actual situation.

The date of the last transaction has a relation to the reload time of the qvd. Newer transactions aren't in there because the QVD was reloaded before the transactions were created. If you just want to know how to incrementzally update the data in a QVD or a related table, you can use the QVD reload timestamp. There is a script function for that to get the timestamp from the QVD header (no loading the entire qvd): QvdCreateTime(filename).

maxgro
MVP
MVP

script to store in a qvd a table

the name of the qvd has the max date of the table 

Table:

Load

floor(today() + rand()*1600) as d

AutoGenerate 1000;

LOAD max(d) as maxfield Resident Table;

LET vMaxDate=date(peek('maxfield'), 'YYYYMMDD');

store Table into Table_$(vMaxDate).qvd;