Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Let In_Path_QVD = '';
Let Out_Path_QVX = '';
//*** Start of the For loop ****
FOR EACH file in FileList('$(In_Path_QVD)\*.qvd');
Data:
LOAD *, FileBaseName() as qvdname
FROM
[$(file)]
(qvd);
let vFile=peek('qvdname',-1,'Data');
STORE Data into [$(Out_Path_QVX)$(vFile).qvx](qvx);
Drop Table Data;
Next;
Is this working
You may optimizing the loads per:
FOR EACH file in FileList('$(In_Path_QVD)\*.qvd');
Data: LOAD * FROM [$(file)] (qvd);
let vFile = subfield(subfield('$(file)', '\', -1), '.', 1);
STORE Data into [$(Out_Path_QVX)$(vFile).qvx](qvx);
Drop Table Data;
Next;
Should be working, i guess
You may optimizing the loads per:
FOR EACH file in FileList('$(In_Path_QVD)\*.qvd');
Data: LOAD * FROM [$(file)] (qvd);
let vFile = subfield(subfield('$(file)', '\', -1), '.', 1);
STORE Data into [$(Out_Path_QVX)$(vFile).qvx](qvx);
Drop Table Data;
Next;
you can drop field 'qvdname' to avoid synthetic key formation like this
for each file in filelist(inpath)
Data:
load *,
FileBaseName() as qvdname
from $(file)
(qvd);
let vfile=peek('qvdname',-1,'Data');
drop Field qvdname;
store Data into [$(outpath)$(vfile).qvx](qvx);
drop table Data;
next file