Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Boa tarde!
Tenho uns 50 qvds gerados com data e nome Ex:
20151127_NOMETABELA.QVD
20151126_NOMETABELA.QVD
20151125_NOMETABELA.QVD
.........
estou querendo caregar somente 10 desses 50 qvds.
E possivel fazer a leitura somente desses 10 fazendo um FOR?
Grato!
Small example with txt files, 4 files, I load 2 of them
Change (adapt) txt to qvd
// read all file names
FOR Each file in FileList('????????_NOMETABELA.TXT')
trace $(file);
FILES:
load '$(file)' as file AutoGenerate 1;
NEXT;
// new table with onle some (in my case 2) files, the first 2 order by file name desc
FILESTOREAD:
NoConcatenate
First 2 load file
Resident FILES
Order by file desc;
DROP Table FILES;
// read the 2 files
FOR i=0 to NoOfRows('FILESTOREAD') -1
LET filetoread=Peek('file', $(i), 'FILESTOREAD');
trace file to read $(filetoread);
LOAD @1
FROM
[$(filetoread)]
(txt, codepage is 1252, no labels, delimiter is '\t', msq);
NEXT;
Small example with txt files, 4 files, I load 2 of them
Change (adapt) txt to qvd
// read all file names
FOR Each file in FileList('????????_NOMETABELA.TXT')
trace $(file);
FILES:
load '$(file)' as file AutoGenerate 1;
NEXT;
// new table with onle some (in my case 2) files, the first 2 order by file name desc
FILESTOREAD:
NoConcatenate
First 2 load file
Resident FILES
Order by file desc;
DROP Table FILES;
// read the 2 files
FOR i=0 to NoOfRows('FILESTOREAD') -1
LET filetoread=Peek('file', $(i), 'FILESTOREAD');
trace file to read $(filetoread);
LOAD @1
FROM
[$(filetoread)]
(txt, codepage is 1252, no labels, delimiter is '\t', msq);
NEXT;