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

How to append a QVD data to other QVD?

Hi,

I need to concatenate a QVD to other QVD based on the month end of "Month_date" column

CurrentData:

LOAD Id,

          Department,

          Date(Today(),'DD/MM/YYYY') as Month_date

From Dummy.xlsx(ooxml, embedded labels);

STORE CurrentData into CurrentData.qvd(qvd);

LET vMonth = Date(Today(),'DD/MM/YYYY');

LET vMonthend= Date(MonthEnd(Today()),'DD/MM/YYYY');

IF '$(vMonth)' =  '$(vMonthend)' then

     Concatenate(CurrentData)

     LOAD * from HistoricalData.qvd(qvd);

         

ENDIF;

DROP Table CurrentData;

But the above Script marked in Red is not working.

Anyone could you help me on this...

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     I am sure you can not see the table CurrentData at all. Am I right?

     If yes then i want to point out something in your script.

     If you look into your script, after concatenating the CurrentData in Historical data, you will need to store the data in to historical again.

     Meaning the data got concatenated in qpplication but not stored in qvd.

     So your script should be like this.

    

CurrentData:

LOAD Id,

          Department,

          Date(Today(),'DD/MM/YYYY') as Month_date

From Dummy.xlsx(ooxml, embedded labels);

STORE CurrentData into CurrentData.qvd(qvd);

LET vMonth = Date(Today(),'DD/MM/YYYY');

LET vMonthend= Date(MonthEnd(Today()),'DD/MM/YYYY');

IF '$(vMonth)' =  '$(vMonthend)' then

Load * ,' ' as junk resident CurrentData;

     Concatenate(CurrentData)

     LOAD * from HistoricalData.qvd(qvd);

    

     Store CurrentData into HistoricalData.Qvd;

            

ENDIF;

DROP Table CurrentData;

Hope this is clear

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

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     It may not be working cause you may not have HistoricalData.qvd

     What error it is giving?

    

Regards,

Kaushik Solanki    

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

Hi Kaushik,

HistoricalData.qvd already existed...

condition is working fine but it is not concatenating the CurrentData table to HistoricalData QVD.

Not applicable
Author

 

  Hi Kumari

Try this

CurrentData:

LOAD Id,

          Department,

          Date(Today(),'DD/MM/YYYY') as Month_date

From Dummy.xlsx(ooxml, embedded labels);

STORE CurrentData into CurrentData.qvd(qvd);

LET vMonth = Date(Today(),'DD/MM/YYYY');

LET vMonthend= Date(MonthEnd(Today()),'DD/MM/YYYY');

IF '$(vMonth)' =  '$(vMonthend)' then

Load * ,' ' as junk resident CurrentData;

     Concatenate(CurrentData)

     LOAD * from HistoricalData.qvd(qvd);

         

ENDIF;

DROP Table CurrentData;

drop field junk;

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     I am sure you can not see the table CurrentData at all. Am I right?

     If yes then i want to point out something in your script.

     If you look into your script, after concatenating the CurrentData in Historical data, you will need to store the data in to historical again.

     Meaning the data got concatenated in qpplication but not stored in qvd.

     So your script should be like this.

    

CurrentData:

LOAD Id,

          Department,

          Date(Today(),'DD/MM/YYYY') as Month_date

From Dummy.xlsx(ooxml, embedded labels);

STORE CurrentData into CurrentData.qvd(qvd);

LET vMonth = Date(Today(),'DD/MM/YYYY');

LET vMonthend= Date(MonthEnd(Today()),'DD/MM/YYYY');

IF '$(vMonth)' =  '$(vMonthend)' then

Load * ,' ' as junk resident CurrentData;

     Concatenate(CurrentData)

     LOAD * from HistoricalData.qvd(qvd);

    

     Store CurrentData into HistoricalData.Qvd;

            

ENDIF;

DROP Table CurrentData;

Hope this is clear

Regards,

Kaushik Solanki

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