Updating Tables Using Excel

gary.newport

Registered User.
Local time
Today, 18:39
Joined
Oct 14, 2009
Messages
79
I have a central database that exports data I require in the form of an XLS or CSV file. I need to get my database to read in each of the records, check each record to see if it exists and then undertake the following process:


  • If it exists then update any information that has changed
  • If it does not exist already to create it as a new record
  • If it already exists in the table but not in the spreadsheet then to mark it as deleted (boolean field) or simply delete the record
Do I need to do this entirely as SQL or how else should I do this?
 
1. Import into a temporary table.
2. Perform an Unmatched query between the temp table and the one you would want to import into
3. Import the unmatched query into your table.
4. Delete the contents of the temporary table.
 

Users who are viewing this thread

Back
Top Bottom