Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a folder of daily Open Order extracts in QVD format. The files are named D_OO_YYYYDD. I want to create a table of all dates that are accounted for.
I could Load FileName() From D_OO_*.qvd, but then all the data is ran through for each QVD. Is there a better way?
Yes:
for each vFile in FileList('your path\*.qvd')
load
'$(vFile)' as Filelistnames
autogenerate(1);
next vFile
Yes:
for each vFile in FileList('your path\*.qvd')
load
'$(vFile)' as Filelistnames
autogenerate(1);
next vFile
Try First option
Data:
First 10
Load FileName() From D_OO_*.qvd;
Data:
Load FileName() From D_OO_*.qvd
WHERE RecNo() = 1;
Hope this helps you.
Hi,
This is working for me
Data:
First 1
Load FileName()
From D_OO_*.qvd (qvd);
OR
Data:
Load FileName() From D_OO_*.qvd
WHERE RecNo() = 1;
Both are working, but first one is faster.
Regards,
jagan.
I thought there had to be a loop! Thanks
Looping will take more time. Instead use First N option. It is faster.
Regards,
Jagan.
I've just tried it, but I'm finding the loop much quicker. Maybe it's because the data is stored on a networked drive and not my local PC.
Edit: Logically though, it makes more sense that the loop would be quicker as it just has to look at the file names, which it has to do anyway to load the data.