Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to read the data from the Single QVD which contains all the data and split into monthly QVD. Please help...
Regards,
qvforum
Hi qvforum,
here's an example script which chould help
YearMonthsFound:
NOCONCATENATE
LOAD concat(distinct YearMonthFound, ',') as YearMonthsFound;
LOAD Year & '-' & Month as YearMonthFound
RESIDENT WhateverTable;
LET vYearMonthsFound = peek('YearMonthsFound', -1);
DROP TABLE YearMonthsFound;
FOR EACH vYearMonthFound IN $(vYearMonthsFound)
TRACE $(vYearMonthFound);
WhateverTable_$(vYearMonthFound):
NOCONCATENATE LOAD *
RESIDENT WhateverTable
WHERE Year = $(vYearMonthFound);
IF vFullReload <> 1 THEN
IF NOT ISNULL(QvdCreateTime('qvd\WhateverTable_$(vYearMonthFound).qvd')) THEN
CONCATENATE (WhateverTable_$(vYearMonthFound))
LOAD * FROM 'qvd\WhateverTable_$(vYearMonthFound).qvd' (qvd)
WHERE NOT EXISTS (KeyField);
ENDIF
ENDIF
STORE WhateverTable_$(vYearMonthFound) INTO 'qvd\WhateverTable_$(vYearMonthFound).qvd';
DROP TABLE WhateverTable_$(vYearMonthFound);
NEXT vYearMonthFound