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

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QVD load with replace/overwrite

I have a table where existing values are changed on a daily basis - name, address etc. I would like to make it a QVD file in order to maximise load time but in a normal QVD load with key it just adds newest update, so the same value exists several times. There is a "value has changed" timestamp in the table, but how do I get it to replace/overwrite existing value with the newest one, so the same person only exists one time ?

There is a unique value for each person and a timestamp when the person's data last has been amended.

1 Reply
prieper
Master II
Master II

You may have a look into the FirstSortedValue-functionality, easiest might be to determine latest change, add an indicator for the last one and to save only the last ones into qvd, like

LEFT JOIN Customer, MAX(UpdateDate) AS UpdateDate, 'Last' AS indLast RESIDENT CustomerTable GROUP BY Customer;
Customers_LastUpdate: NOCONCATENATE LOAD * RESIDENT CustomerTable WHERE indLast = 'Last';
STORE Customers_LastUpdate AS Customer.qvd;


HTH
Peter