Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have two years data .i have to store the data into weekly qvd's. let's assume i have if i have two months data and i need to break the data into weekly qvds for every week.And qvd name should be the week start name.
Any help will be appreciated.
Yeah!!
but i couln't populate data into qvds ,it might be my path problem
Hi
The above code is giving weekstart of 1st year 1st month .it is giving the same weekstart for all the months.
But i need weekstart for every week .
Thanks
The script I already posted is in the attachment
I tried, reload and I get the s.qvd (test data) splitted in weeks qvd
example w_20150126.qvd has dates from 26 jan to 01 feb
Hi
Thanks for your solution. Its working fine .It is breaking into week qvds.But the problem is when i am storing it into qvds is throwing error table not found.I have checked my path its correct .
weekstart:
load * Resident Data
Where SALES_DATE >='21/01/2015' and SALES_DATE <='22/06/2015';
let file = date(Date#('$(vweekstart)'),'YYYY/MM/DD');
TRACE file =$(file);
STORE weekstart into [$(mypath)/$(file)].qvd(qvd);
DROP Table weekstart;
Thanks
maybe table not found is weekstart
add a noconcatenate
weekstart:
noconcatenate load * Resident Data
Where SALES_DATE >='21/01/2015' and SALES_DATE <='22/06/2015';
let file = date(Date#('$(vweekstart)'),'YYYY/MM/DD');
TRACE file =$(file);
STORE weekstart into [$(mypath)/$(file)].qvd(qvd);
DROP Table weekstart;
I used noconcatenate but it is not giving values week by week and moreover it script execution is failing .
could you post your script and your source data (qvd)?
This is the error i am facing .
Hi ,
My qvd is too large to attach.
But my script is below
Data:
LOAD
SALES_DATE,
From
[./QVD/SALES.QVD](qvd);
let vweekstart =WeekStart('21/01/2015');
let vweekend =WeekStart('22/06/2015');
do while vweekstart <= vweekend
trace vweekstart=$(vweekstart);
week:
load * Resident Data
Where SALES_DATE >='21/01/2015' and SALES_DATE <='22/06/2015';
let file = date(Date#('$(vweekstart)'),'YYYY/MM/DD');
TRACE file =$(file);
STORE week into [.\QVD\$(file).qvd];
DROP Table weekstart;
let vweekstart=date(vweekstart+7);
LOOP;
DROP TABLE Weekstart will also fail, it should be 'week' instead.