Query to overwrite reversioned data

T

Tony in Michigan

Hello,
I have a large table of source data, which has records that are often
updated and reversioned. I maintain a local database, with a subset of my
records, from this larger database, and update it weekly. I have no local
connectivity to the master data.

I pull my update data set based on a date field, so that I get a large
overlap, I then use an unmatched querey to append the unique [record
number_Vnnn] to my local table.

100_1
101_1
102_1
030-3

Using the example above, if these are the unique records in the imported
data, how would I go about writing a query that would overwrite the existing
030 V? record with the reversioned record 030 V3 and append the 100-102 V1
records? In the master database, this occurs automatically, with old
versions being moved to an archive table, I pull from the latest snapshot of
the data, so timing is the main culprit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top