Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
quriouss
Creator III
Creator III

Update/Delete/Overwrite (not insert) single records in QVD file?

I have a large list of customer records and of course, from time to time those records changed (addresses are changed, marketing segmentations are updated, etc).

I can extract just the "recently-changed" records from my database, that's not a problem, but is there a way to update only those records in the QVD file which holds all the client records?

I can do a Load followed by a Concatenate and I can also use WhereNotExists to add *new* clients.  However, I can't work out how to drop the *updated* clients, and I end up with two rows. for those records.

Is there a way to either delete, mark as deleted, or drop individual records in a QVD?

3 Replies
pokassov
Specialist
Specialist

Hi!

As we can read this in manual if we have to delete some records from our qvd-file there is one way. It's load "primary key" from our table in the database and inner join it to the table.

In case to change record the WhereNotExists works perfect:

1. load new and changed records

2. concatenate qvd with wherenotexists (id)

3. save table into qvd.

Not applicable

Hi Quriouss,

1) for updating records concatenate with WhereNotExists(primary key),

2) for deleting we have to do inner join with DB loaded QVD and our daily loaded QVD.

Thanks

Avinash

Not applicable

Quriouss,

This use case is same as Incremental load where you don't want the first scenario i.e. insert only.

For Updating or overwriting the records in qvd -

- use where Not Exists (primary_key) in qvd load while concatenating the source file table

For deleting the records from qvd

- Just load primary key from qvd file after loading the above tables and create the inner join with this table load.

The inner join will compare the source file with qvd and will exclude the records from resultant tables which are missing (deleted) from source file.