TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
Importing records based on several columns/fields for matching with existing records
Am I right in thinking that it is not possible to do an import into a table where the matching column is not just the Key column but where several columns can be used to identify existing records?

Example: we have a table with 100k records. I want to compare with a new version of the same table where most records are the same but there might be a few thousand new ones and a few hundred already existing in the old table but with updated information.
Can I compare the two tables and "upsert" (update or insert) into the old table those records that have changed (or that don't exist) based on these criteria: FirstName, LastName, Address1, Address2?
These tables don't have an Email or a Phone column.

Any suggestion, much appreciated.
ID
1538
Category
Other
Author

Luison Lassala
Date Created
7/13/2022 2:59:54 AM
Date Updated
7/13/2022 3:05:19 PM
Comments
Luison Lassala 7/13/2022 3:05:19 PM
With Slava's help, I was able to get this working, as follows:

We need several many-to-many relations between newly imported and original table so that we have "or" matching conditions for the various fields that might have changed.

After the two tables are matched, we will need to:
1. Export all non-matched records from the new table
2. Import the exported records into the old table: new additions (will acquire a new key field value) and existing changed records (which will be matched at import with an existing key field value).
Feedback
Back to Search Results