Data import question

  • Thread starter Thread starter test guy
  • Start date Start date
T

test guy

So I have a delimited .CSV file being imported into a table on a daily
basis.. and the way things are setup now, any duplicate records or existing
records are ignored during import.

Problem is, I've got people updating existing records, which then show in
the .CSV, but aren't getting into my table! Is there a way in which I can
modify the import so that any updated fields (records exist, but certain
fields vary from existing data) can be updated without completely writing
over the unchanged fields?
Thanks-
 
Hi TG,

Any chance you could add a "Date Modified" field into whatever is producing
the *.csv? Then you could just append them all and weed out dups based on
the date they were modified.

HTH,

Jake
 
You post is so confusing that it is difficult to provide a straight answer.
see notes below.

Anyway, here is a potential solution.
Import the contents of the CSV file into a "staging" table - this is like a
temporary table that you use to hold the data for a little while
(typically, you would empty the staging table once you complete your
processing.)

From this staging table, you can drive the inserts and updates.
I suppose you could a series of update statements that meet your rules of
what should/shouldnt be updated

Before you begin, try to write out a step by step process of what you need
done - create a flow chart if needed.

good luck
HS



test guy said:
So I have a delimited .CSV file being imported into a table on a daily
basis.. and the way things are setup now, any duplicate records or existing
records are ignored during import.

Problem is, 1. --
I've got people updating existing records, which then show in the .CSV,

but aren't getting into my table! Is there a way in which I can

2. --
modify the import so that any updated fields (records exist, but certain
fields vary from existing data)
3.--
can [those records] be updated without completely writing
over the unchanged fields?

From 1 above,
A copy of the updated record is available in the text file

From 2 Above
Certain fields vary from existing data.
This contradicts 1
What is the case?
does the updated record exist in the table?
Does it exist in the CSV file?
Shouldn't it exist in both?

From 3
in an update, changed fields are different, unchanged fields are same,
right?
so, what is we update the whole record - unchanged fields continue to remain
unchanged -
 
Back
Top