Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello ,
Here is a script :
ODEC:
load * from
[lib://DisqueC (nr_arnault.doespirito)/QlikviewData\SourceDocuments\ABONNEMENTS\Historique ODEC\ODEC.qvd]
(qvd);
jours:
load Distinct DATE_ARCHIVE as date_archive from
[lib://DisqueC (nr_arnault.doespirito)/QlikviewData\SourceDocuments\ABONNEMENTS\Historique ODEC\ODEC.qvd]
(qvd) ;
//création des qvd
for i = 1 to NoOfRows('jours');
NoConcatenate
tableODEC:
load * resident ODEC where DATE_ARCHIVE = Peek( 'date_archive', $(i), 'jours');
store tableODEC into 'lib://DisqueC (nr_arnault.doespirito)\QlikviewData\SourceDocuments\ABONNEMENTS\Historique ODEC\'?????'ODEC.qvd' (qvd);
drop table tableODEC;
next i;
I load a global table ODEC.
Then a second jours with the distinct dates extracted from ODEC.
I then want to create as many qvd files from ODEC as there are dates in jours.
My loop works correctly.
At the STORE level I would like to prefix the ODEC name with the current date in the loop.
17072024ODEC then 18072024ODEC
etc...
can you help me?
Thanks a lot,
Arnault
Hi, you can create a variable with the date and use it to create the file name, like:
LET vFileDate = Date(Peek( 'date_archive', $(i), 'jours'),'DDMMYYYY');
..
store tableODEC into .... \Historique ODEC\$(vFileDate)ODEC.qvd' (qvd);
I would suggest to use a YYYYMMDD format, so the alfabetic sort will be the same as the date order.