Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have 10 qvd's,taht qvd's contains year wise data,my req is I want to split that qvds into monthly wise qvds,that means each qvd splited into 12 qvds based on date field.instead of writeing script on every time ,I want create a subroutine and call that sub, pass the qvd name as a parameter.how to achive this?
Regards,
koti.
Hi,
That can be done while creating the task in QMC by using loop and reduce option in Reduce<tab> of the QMc task, there we can define the field and value wise split, so that for every run the data will be splitted
Something like this:
ForEach vYearQVD in ('..\QVDs\Sales_*.qvd')
Let vYear = Right(SubField(vYearQVD, '.', 1), 4);
For i = 1 to 12
MonthQVD:
LOAD * FROM [$(vYearQVD)] (qvd)
WHERE Num(Month(TransDate)) = $(i);
Let vFilePrefix = Date(MakeDate(vYear, i, 1), 'YYYYMM';
STORE MonthQVD into [..\QVDs\Monthly\Sales_$(vFilePrefix).qvd'] (qvd);
DROP Table MonthQVD;
Next
Next
Assumptions:
Adjust according to your specific requirements...
Search the community, and you'll find lots of tips and tricks, and even solutions that are 90% complete.
Like: How to store the data of a table into Monthly and MonthEnd QVD's?
First load all your QVD's in a single resident table, then apply one of the solutions from that discussion.
Peter
Hi jonathan,
I have a one qvd(sample.qvd),that qvd contains the one year data.per ex :apr2014 to mar 2015,
i want to split that qvd into monthly wise qvd like sample.4.2014.qvd,
sample.5.2014.qvd,
.
.
.
sample.3.2015.qvd
and store that qvd's in req loc(ex:d:/qvds/sampleqvds)
i want to achive this by using sub routine.and that two paths(sample.qvd,sample.4.2015)pass as parameters.
that means i want to pass the sample.qvd path and monthlyqvds stored path.
ex: call sub('sampleqvd path','monthly stored qvds path')
how to achive this?
can you please send me a sample app...
Regards,
kd