Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

storing data into qvd in monthly basis

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

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Have a look at the attached application.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

10 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Hi , Thanks for the reply

I'll try with my data and let you know

Anonymous
Not applicable
Author

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/2014car
2/1/2014car
5/1/2014car
10/1/2014car
15/1/2014car
30/1/2014car
31/1/2014car
1/2/2014car
2/2/2014car
5/2/2014Bike
10/2/2014Bike
23/2/2014Bike
26/2/2014Bike
1/3/2014Bike
10/3/2014Bike
15/3/2014Bike
25/3/2014Bike
28/3/2014Bike
30/3/2014Bike
5/4/2014Truck
10/4/2014Truck
15/4/2014telephone
20/4/2014Mobile
30/4/2014refrigerator
4/5/2014Television
20/5/2014Owen
30/5/2014Bulb
31/5/2014Fan
2/6/2014Air
10/6/2014Refrigerator
29/6/2014Truck
1/7/2014Truck
10/7/2014car
28/7/2014Car
1/8/2014Owen
10/8/2017Bulb
15/8/2014Fan
29/8/2014Air
1/9/2014Refrigerator
10/9/2014Owen
25/9/2014Bulb
1/10/2014Fan
15/10/2014Air
30/10/2014Refrigerator
1/11/2014Owen
5/11/2014Bulb
10/11/2014Fan
25/11/2014Air
29/11/2014Refrigerator
1/12/2014Owen
15/12/2014Bulb
30/12/2014Fan
31/12/2014Air
1/1/2015Refrigerator
10/1/2015Owen
15/1/2015Bulb
30/1/2015Fan
2/2/2015Air
10/2/2015Refrigerator
15/2/2015Owen
1/3/2015Bulb
20/3/2015Fan
25/3/2015Air
1/4/2015Refrigerator
15/4/2015Fan
Anonymous
Not applicable
Author

Error.bmp

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Try to put in quote

'$(vMonth)' in where condition.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Have a look at the attached application.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Hi Kaushik,

can you please explain the following code line by line .

sona_sa
Creator II
Creator II

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