Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I have Simple Update/Insert QVD File

Hi,

I have some BIG files ans I want to compress it into QVDFile.

How can I create a qvdfile Insert or Update with my file.

I don't have the modification date and a real Primary Key.

I create qvdFile with condition :

WHERE NOT EXIST([n° PDV]) in Excel file it works good but not in my qvd file.

Someone  could you help me ?

Thanks in advance.

3 Replies
Gysbert_Wassenaar

First you load everything from your qvd and then you load everything from the same qvd that you didn't load from your qvd the first time.

//Update/Insert

T1:

LOAD

          [n° PDV],

...

FROM C:\QvdFileUI\T1.qvd(qvd);

Concatenate

LOAD

          [n° PDV],

...

FROM C:\QvdFileUI\T1.qvd(qvd)

WHERE NOT EXISTS([n° PDV]);

So you don't load anything with the second load statement.

What you probably want is load the new and updated records from the excel file and then load everything from your qvd file where n° PDV doesn't exist yet. That way you only load the records from the qvd that were not updated. The resulting table will have all the complete set of records, new, updated and unchanged, without duplicates. You can then store the table again in T1.qvd.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

I tried this tonigh, but I would like avoid the file source. Because I load first my flat file, then my qvdFile after I concatenate all in table PDV.qvd or T1.qvd. Flat Flat works with Cancel and Replace so just Insert. There is never updated file. I thought it was possible to work only with qvd file and see news records.

PDV:

LOAD
     
[n° PDV],
    
Fields,

     ...
FROM C:\QvdFileUI\UpdateInsertQvdFile.xlsx (ooxml, embedded labels, table is Feuil1);

STORE TempPDV INTO C:\QvdFileUI\UpdateInsertQvdFile.qvd(qvd);

PDV:
LOAD
     
[n° PDV],
    
Fileds,

     ....
FROM C:\QvdFileUI\UpdateInsertQvdFile.qvd(qvd);

Concatenate

PDV:
LOAD
    
[n° PDV],
     Fields,

     ....
FROM C:\QvdFileUI\UpdateInsertQvdFile.qvd(qvd)
WHERE NOT EXISTS([n° PDV]);

I can see news records because I load my flat file, right ? I just want to work only with qvdFile. It is possible ?

I have a falt file with 2000 000 records. first I load all file then store in qvd and afterthat load from qvd and concatenate from qvd where exits ... It's that true ?

Not applicable
Author

Many Thanks Gysbert for your help.