Discussion Board for collaboration on QlikView Scripting.
How to load multiple csv files in single load statement in Qlikview.
Problem is ::::
I have a some files in one location.. my point of view i want to load all files and generate qvd data file for each source file.
It should be done dynamically..
In SSIS, it is possible, Is there any possibility using Foreach loop and variables.
You could use a script like this or see the examples in help under "for ... next // for each ... next":
Load *, filename() as FileName From Path\Prefix*.csv (txt, codepage is 1252, embedded labels, delimiter is '\t', no quotes)
let vFileCount = fieldvaluecount(FileName);
for i = 0 to $(vFileCount) - 1
let vFileName = peek('FileName', $(i), 'x');
noconcatenate Load * Resident x Where FileName = '$( vFileName)';
store temp into '$( vFileName)'.qvd (qvd);
drop table temp;
Which way will best suited is depend from your folder/filename-structure, amount of data ...
The Debugger skipping the Execution and throwing an error at below code line.
Set vPath='C:\Users\chandra.mohanc\Desktop\QlikView Training\Sources\';
Load *, filename() as FileName From $(vPath)*.csv (txt, codepage is 1252, embedded labels, delimiter is '\t', no quotes);
Try this and/or check the path:
From [$(vPath)*.csv] ...