Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I have a folder with some amount of .qvds. Each file in this folder has a name like "Sub_YYYYMMDD". For each new day I have one new qvd with name that ends with a date when file was loaded (as example Sub_20200622) .
When I need to load all files from the folder I use next loop
TMP:
load * Inline [File_FK];
For Each File in Filelist('Folder\*.qvd')
Concatenate (TMP) Load * From [$(File)](qvd);
Next File
But also I need to load only part of the files I have in this folder. Lets say I need files that was loaded for the last 10 days till today. In other words I need to load files with names from 20200617 till 20200626. And I don't understand how to put this condition in the loop. Need your help to understand how this condition may be implemented?
Hi,
Maye be this version :
TMP:
load * Inline [File_FK];
For Each File in Filelist('Folder\*.qvd')
let vFlag=Floor(Date(today())-Date(Date#(left(right('$(File)',12),8),'YYYYMMDD')));
if $(vFlag)<=10 then
Concatenate (TMP)
Load * From [$(File)](qvd);
endif
Next File
Hi,
Maye be this version :
TMP:
load * Inline [File_FK];
For Each File in Filelist('Folder\*.qvd')
let vFlag=Floor(Date(today())-Date(Date#(left(right('$(File)',12),8),'YYYYMMDD')));
if $(vFlag)<=10 then
Concatenate (TMP)
Load * From [$(File)](qvd);
endif
Next File
@Taoufiq_Zarra Thank you. Your idea is helpful.