Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

using loop to generate multiple qvds

Hi..

I am using a loop to generate multiple qvd.

below is my script

SET DATA_FilePath='C:\Users\43862460\Desktop\Incremental Load\';

FILES:
load * Inline [
FileName
Echannels
MEHIE
]
;



for i  = 1 to FieldValueCount('FileName')

let lastexectime  =  num(date(ReloadTime(),'MM/DD/YYYY hh:mm:ss TT'));
let BeginningThisExectime  =  num(date(now(),'MM/DD/YYYY hh:mm:ss TT'));

let vFileName  =  FieldValue('FileName',$(i));

$(vFileName):
load
*

FROM
[$(DATA_FilePath)$(vFileName).xlsx]
(
ooxml, embedded labels) where ([Modified Date] >= '$(lastexectime)' and [Modified Date] < '$(BeginningThisExectime)' ) ;
STORE $(vFileName) into [$(DATA_FilePath)$(vFileName).qvd](qvd);


next i;

drop Table FILES;

This script run fine when there is a single File name and generate qvd.

The moment I add a second file name to it it says unable to store the second qvd in the given path. The first qvd gets created successfully.

Can anybody please help as to what is going wrong with QVD creation for the second file?

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be helpful

https://community.qlik.com/docs/DOC-6754

Or

Below link, Check from 3 rd statement of Loop

Loading Multiple QVD files

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

1 Reply
Anil_Babu_Samineni

May be helpful

https://community.qlik.com/docs/DOC-6754

Or

Below link, Check from 3 rd statement of Loop

Loading Multiple QVD files

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful