Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Re: How to append a QVD data to other QVD?

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

4 Replies

Re: How to append a QVD data to other QVD?

Hi,

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

     What error it is giving?

    

Regards,

Kaushik Solanki    

Not applicable

Re: How to append a QVD data to other QVD?

Hi Kaushik,

HistoricalData.qvd already existed...

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

Not applicable

Re: How to append a QVD data to other QVD?

 

  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;

Re: How to append a QVD data to other QVD?

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

Community Browser