Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have data from 1st jan 2014 to 2nd Feb 2015 .i need to create qvd for each month data .for example i have january ,total january data should be store ini one qvd ,feb data should be store in other qvd .The same should be done for all data .It has to create seperate qvds for each month's data .Any help is appreciated
Thanks
Have a look at the attached application.
Regards,
Kaushik Solanki
Hi,
You would need to use the for loop to do this.
Sample script would be like below.
Month:
Load Distinct Month(Date) as MONTH From XYZ;
Let vCount = noofrows('Month');
For i=0 to $(vCount) -1
Let vMonth = peek('MONTH',$(i),'Month');
$(vMonth):
Load * from XYZ where Month(Date) = $(vMonth);
Store $(vMonth) into $(vMonth).qvd;
Drop Table $(vMonth);
Next
Regards,
Kaushik Solanki
Hi , Thanks for the reply
I'll try with my data and let you know
Hi Kaushik ,
I have tried .But i am getting the following error like field not found error (Field is month name eg: mar not found)
i am sharing my sample data .
PurchaseDate | Product |
---|---|
1/1/2014 | car |
2/1/2014 | car |
5/1/2014 | car |
10/1/2014 | car |
15/1/2014 | car |
30/1/2014 | car |
31/1/2014 | car |
1/2/2014 | car |
2/2/2014 | car |
5/2/2014 | Bike |
10/2/2014 | Bike |
23/2/2014 | Bike |
26/2/2014 | Bike |
1/3/2014 | Bike |
10/3/2014 | Bike |
15/3/2014 | Bike |
25/3/2014 | Bike |
28/3/2014 | Bike |
30/3/2014 | Bike |
5/4/2014 | Truck |
10/4/2014 | Truck |
15/4/2014 | telephone |
20/4/2014 | Mobile |
30/4/2014 | refrigerator |
4/5/2014 | Television |
20/5/2014 | Owen |
30/5/2014 | Bulb |
31/5/2014 | Fan |
2/6/2014 | Air |
10/6/2014 | Refrigerator |
29/6/2014 | Truck |
1/7/2014 | Truck |
10/7/2014 | car |
28/7/2014 | Car |
1/8/2014 | Owen |
10/8/2017 | Bulb |
15/8/2014 | Fan |
29/8/2014 | Air |
1/9/2014 | Refrigerator |
10/9/2014 | Owen |
25/9/2014 | Bulb |
1/10/2014 | Fan |
15/10/2014 | Air |
30/10/2014 | Refrigerator |
1/11/2014 | Owen |
5/11/2014 | Bulb |
10/11/2014 | Fan |
25/11/2014 | Air |
29/11/2014 | Refrigerator |
1/12/2014 | Owen |
15/12/2014 | Bulb |
30/12/2014 | Fan |
31/12/2014 | Air |
1/1/2015 | Refrigerator |
10/1/2015 | Owen |
15/1/2015 | Bulb |
30/1/2015 | Fan |
2/2/2015 | Air |
10/2/2015 | Refrigerator |
15/2/2015 | Owen |
1/3/2015 | Bulb |
20/3/2015 | Fan |
25/3/2015 | Air |
1/4/2015 | Refrigerator |
15/4/2015 | Fan |
Hi Try to put in quote
'$(vMonth)' in where condition.
Regards,
Kaushik Solanki
Hi Kaushik
thanks a lot its working fine.
But i couldn't populate all months into qvds.I couldn't populate few months data into qvd
Thanks
Have a look at the attached application.
Regards,
Kaushik Solanki
Hi Kaushik,
can you please explain the following code line by line .
Hi Kaushik,
It is working fine, Need some changes like -
I want, If the QVD is Current Month Data then if should to store as E2E_Historization, Else If Qvd is Previous Month the it should to store as Mar 2018_E2E_Historization, Apr 2018_E2E_Historization, May 2018_E2E_Historization......
Is it possible ?
Regards,
AK