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.
Save your qvds like this may be:
and so on...
and when you try to pull them you can do this:
FROM FileName_*.qvd (qvd);
and this will auto-concatenate everything to the Table TableName
Hope this is what you were looking for? If not please explain...
// test data, one year of dates stored in a qvd
date(makedate(2015) + rowno() -1) as date,
floor(rand()*100) as val
STORE s into s.qvd;
// loop to store by week
date(min(date)) as mindate,
date(max(date)) as maxdate
from s.qvd (qvd);
do while vweekstart <= vweekend
NoConcatenate load * from s.qvd (qvd)
where date >= '$(vweekstart)' and date <= date('$(vweekstart)'+6);
let file = 'w_' & date(Date#('$(vweekstart)'), 'YYYYMMDD');
STORE w into '$(file)'.qvd (qvd);
DROP Table w;
Hi Sunny ,
Thanks for immediate reply !!
i need to load the data and i have to store the data into qvd's .
suppose if i have one year data with date .
lets start date =2014-01-01 and End Date = 2015-01-01
I need to run my database query on above condition.
suppose if 1st jan 2014 has 4 weeks then i have to seperate data for each week and store it in qvd .
lets asssume i have one month data .One month has 4 weeks .
while i am loading one months data first week's data should be stored in one qvd and this qvd should be named with weekstart of that particular week.
The same should be repeated for remaining 3 weeks and 3 qvds should be generated ,