Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to know if you can use from to load more then a qvd file: like that :
TableName:
LOAD
FieldList
FROM ..\Data\FileName.qvd (qvd), .\Data\FileName.qvd2 (qvd);
Thanks
Wieme,
Not sure what you are asking. But try this,
TableName:
LOAD *
FROM ..\Data\*.qvd (qvd);
For example if you have all your qvd files in a folder,
then you can load all of them as below:
TableName:
LOAD
*
FROM 'c:\temp\*.qvd' (qvd);
Hi
The LOAD statement does not support multiple files in a single call. Instead use the FOR loop to load all qvd files in a folder recursively. Use something like this:
FOR EACH FoundFile in Filelist(.'.\Data\*.qvd')
<LOAD STATEMENT>
NEXT FoundFile
Do remember that all files, if having similar table structure would be concatenated "intelligently" by qlikview. To get more predictable and controlled results, it may be a better idea to explicitly state concatenate or noconcatenate as needed. Also consider using qualified field names if your qvd files have more than 2 similar field names to avoid creation of complex synthetic keys
No, not like this. The FROM clause accepts only one source file name. Luckily the file name can contain wildcards.
However, you should be careful with wildcards in LOAD statements as some other useful LOAD statement clauses may stop working or may generate error messages. And you will not be able to do a Preceding LOAD.
Also think about what should happen with this multi-file load when the two (or more) source QVDs don't have a common layout. You may want to JOIN or CONCATENATE rows, but QlikView will not know what to do all by itself.
Peter
What are your thoughts on my approach for using the FOR EACH loop?
Hitherto haven't faced any issues with the LOAD statement since the wildcard is not introduced into the LOAD itself