Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
penpayom
Contributor II
Contributor II

Can qlikview keep the old data?

I want to archive old data in qvd by record current data in new rows without overwriting old data.

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try like:

Data:

LOAD Article,

     Stock,  

     today () as date

 

FROM

(ooxml, embedded labels, table is Sheet1);

Set ErrorMode=0;

IF NOT IsNull(QvdCreateTime('Archive_Data.qvd')) THEN

Set ErrorMode=1;

    CONCATENATE (Data)


    LOAD * FROM Archive_Data.qvd (qvd);

    STORE Data INTO Archive_Data.qvd (qvd);   

ELSE                                                     // This ELSE part can be omitted after first time run

Data:

      LOAD * FROM Archive_Data.qvd (qvd);

      STORE Data INTO Archive_Data.qvd (qvd);     

ENDIF

View solution in original post

4 Replies
tresB
Champion III
Champion III

I am not sure if I follow you correctly or not. QV lets you store data in qvd format which could be referred later for future use. Once you store the data in qvd, it is static. Usually, if you need to add/delete some data to/from it, you have to load the qvd in qv and perform the operation in script and then write back the modified data newly in qvd.

penpayom
Contributor II
Contributor II
Author

Can you guide the code?


this my code,but it it overwriting old data.

Data:

LOAD Article,

     Stock,    

     today () as date

   

FROM

(ooxml, embedded labels, table is Sheet1);

///////////////////////////////////////////////////////////////////////////////

Archive_Data:

LOAD *;

IF NOT IsNull(QvdCreateTime('Data.qvd')) THEN

    CONCATENATE load(Data);

    LOAD * FROM Data.qvd (qvd);   

ENDIF

STORE Data INTO Archive_Data.qvd (qvd);     

/////////////////////////////////////////////////////////////////////////////

tresB
Champion III
Champion III

Try like:

Data:

LOAD Article,

     Stock,  

     today () as date

 

FROM

(ooxml, embedded labels, table is Sheet1);

Set ErrorMode=0;

IF NOT IsNull(QvdCreateTime('Archive_Data.qvd')) THEN

Set ErrorMode=1;

    CONCATENATE (Data)


    LOAD * FROM Archive_Data.qvd (qvd);

    STORE Data INTO Archive_Data.qvd (qvd);   

ELSE                                                     // This ELSE part can be omitted after first time run

Data:

      LOAD * FROM Archive_Data.qvd (qvd);

      STORE Data INTO Archive_Data.qvd (qvd);     

ENDIF

penpayom
Contributor II
Contributor II
Author

Thank you very much
It's done
Thank you so much