Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
How to load all qvd's in loop from root folder and store all the qvds into one single qvd
Thanks
Hi,
do the qvd's all have the same fields so you can concatenate them?
Then the easiest will be to load with an * from that directory - just replace the variable name of the file_name with the *, QlikView will then load all that is there in one go.
The slightly more lengthy - but easier to debug - approach would be to step through all the files in that directory with a searchmask and load them one by one - that way, the log will show every single LOAD and in case of an error, you can easily tell which of your qvd's was fawlty.
HTH
Data:
LOAD *
FROM RootFolderPath\Data*.qvd
store Data into Data_Final.qvd;
drop table Data;
Hi ,
I am trying to load the qvds using loops .
i tried following code and its not working.
SET vFolder = '$(qvdpath)';
let vFileName = FilePath('$(qvdpath)*');
FOR EACH vFileName IN filelist('$(vFolder)')
LET vNameOfTable = QvdTableName('$(vFileName)');
[$(vNameOfTable)]:
load
*
from $(vFileName) (qvd);
store [$(vNameOfTable)] into fact2.qvd(qvd);
next vFileName
Thanks
Perhaps like this:
MyTable:
Load * from *.qvd (qvd);
Store MyTable Into MyTable.qvd (qvd) ;
But all qvd files should contain exactly the same number of fields with the exact same case-sensitive names. If that's not the case you need a loop like in this post: loop through to load all files from a folder and its subfolders?
Hi Gysbert,
I want to load the qvds in loop rather than using * from root folder .
Thanks
Files:
First 1 LOAD FileBaseName() as FileName
FROM
[FolderPath \*.qvd ](qvd)
(qvd);
Data:
LOAD * Inline [
Test ];
let vCount = FieldValueCount('FileName');
FOR i=1 to $(vCount)
let vTable =FieldValue('FileName',$(i));
Concatenate(Data)
LOAD *,
'$(vTable)' as File
FROM
[FolderPath\$(vTable).qvd]
(qvd);
NEXT
DROP Field Test from Data;
STORE Data into FolderPath\Data_Final.qvd;
DROP TABLE Data