Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
how to update the qvd file with modified data
i am new to qlik vies please help me.
Thanks in Advance
Hi,
One possible way:
- First read records from the old QVD file to the table, let's say 'NewQVD'
- Concatenate new data to the table 'NewQVD'
- Override existing QVD file using STORE NewQVD TO 'PathToOldQVDfile'
I hope it will help you.
Kind regards,
Janusz
hello,
you can try
"load
*****
from myold.qvd
concatenate
load
****
from mynew.qvd
where not exists(keyprimary);
store *.qvd to *.qvd
"
so new record will be added in your *.qvd et old record will be updated if the record had been modified
noelgreg,
I can see from your example that the script by using the "where not exists(keyprimary);" statement would add new records but I dont understand how it would update the records in the "myold.qvd" file. This is where my thought process takes me:
So since primary key field didnt change your code would not update the record. I am not an expert by any means I so I could be completely missing something. I am just looking for a solution for the same posted question.
Please check the incremental load sample in the QV cookbook ( available here: http://robwunderlich.com/downloads/ ). It should explain quite nicely how to handle new / updated / deleted records.
Stefan
swuehl,
Thank you for your response. I am as a matter of fact using the cookbook which I was about to test. I figured I would try to get a better understanding before diving into full testing. I was about to post a question about updating a qvd which was created form joining more than one SQL table so I will just do that on a new thread.
Thanks
Perhaps your confusion in this thread and the other similar thread is that for updates, the examples in this thread are backwards. You should load the changed (delta set) records first, and then concatenate load the old records with "where not exists(primarykey)".
-Rob