Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I Have a QVD which has Accounting Period column contains a list of 2 years data MMYYYY(i.e;012015)
How to write logic to remove all old data (more then 6 months old)from the current Month-Year to previous 6 month QVDs
and move them into Seperate QVD.
from Temp.qvd(qvd)
AccPrdOGIS consists of YYYYMM Format like 201501
Hi,
For Yearly Qvd creation you can get help from this Document this creates Yearly QVD.
Year Wise Qvd creation from Source Data
Regards
Anand
Hi,
Try:
LOAD Distinct Year(date#(AccPrdOGIS,'YYYYMM')) AS YearField,
date(date#(AccPrdOGIS, 'YYYYMM')) as PeriodStartMonth,
date(floor(MonthEnd(date#(AccPrdOGIS, 'YYYYMM')))) as PeriodEndMonth,
year(date#(AccPrdOGIS, 'YYYYMM')) as PeriodYear,
ceil(month(date#(AccPrdOGIS, 'YYYYMM'))/3) as PeriodQuarter,
year(date#(AccPrdOGIS, 'YYYYMM')) & ceil(month(date#(AccPrdOGIS, 'YYYYMM'))/3) as PeriodYearQuarter
FROM
(
Order by Year(date#(AccPrdOGIS,'YYYYMM')) asc;
EXIT Script;