Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I need your help for the following Problem that I have.
I Have to merge Several Txt Data sets from different Subfolders in to one QVD,
and attached with the foldername.
I try it with this Script but i get an error:
"Field names must be unique within table"
Set vConcatenate = ;
sub ScanFolder(Root)
for each FileExtension in 'txt'
for each FoundFile in filelist( Root & '\*.' & FileExtension)
FileList:
set vConcatenate;
first 10
LOAD *,
mid('$(FoundFile)' ,51,7) as Maschine,
mid('$(FoundFile)',59,11) as Material,
'$(FoundFile)' as Foundfile
FROM [$(FoundFile)] (txt, utf8, embedded labels, delimiter is '|', msq);
Set vConcatenate = Concatenate;
next FoundFile
next FileExtension
for each SubDirectory in dirlist( Root & '\*' )
call ScanFolder(SubDirectory)
next SubDirectory
end sub
Call ScanFolder('lib://QNAP BDE (prst_a.benchigra)/BDE Datenablage/') ;
Hi @KarimBen ,
It looks like your call of vConcatenate is not quite right. Just above the "First 10" it shouldn't have "Set vConcatenate" it should just read as $(vConcatenate). I think it also has to be moved above the table name "FileList".
I hope that does the trick.
Regards
Anthony