How do I proceed if I have several tables and these are linked to each other?
For example, I have a table with roles. These roles have a name. Now I want to synchronise them.
The key is the role name.
If I now add a second table. E.g. role surfaces layout.
The key of the role table is now in this table.
How can I now make it not take the key of the role but the role name as a reference and then search for the ID there?
I would like to be able to configure the comparison key and this lookup for each table.
Can I do this in DataCompare?
Can I do this in SQL SourceControl?
Comments
1 comment
-
Hello,
You can configure custom comparison keys for each table to match rows based on specific columns, like using the role name rather than role id. Here's how you can set it up:
1. Open SQL Data Compare and set up your data sources for comparison.2. In the "Tables & Views" mapping screen, locate the tables you want to compare.3. For the table where you want to use a custom key (e.g., the "roles" table), click on the "Comparison Key" column next to the table name.- If SQL Data Compare hasn't automatically selected a comparison key, or if you want to change it, you can specify a custom comparison key.
- Select the columns you want to use as the comparison key (e.g., the "role name" column).
By setting a custom comparison key, SQL Data Compare will match rows based on the specified columns, allowing you to synchronize data accurately even when using natural keys like role names instead of surrogate keys like role IDs.
Add comment
Please sign in to leave a comment.