Updating Child Tables on Data Compare

Compares and synchronizes SQL database content.

Updating Child Tables on Data Compare

Postby szara.loring » Thu May 03, 2012 4:45 pm

I have a situation where I have a reference (parent) table. For Example: City - which has a PK (assigned by the system) and then the city short name, long name, FK to state, etc. I have a child table for Shipping Address. The shipping address has a FK to the City table.

On the data compare - we find that the City PKs are out of sync between the master copy and the environmental copy. So we use data compare to identify and update the City table. For example, city #21 is Houston, Texas in the master but is Anchorage, Alaska in the env. copy. Data compare recognizes this and creates an update script which updates the city table. But now all the shipping addresses in the env. copy that referred to Anchorage now refer to Houston.

Is there any way to have data compare to evaluate which records in the child (shipping address table) to update?

Thanks
szara.loring
 
Posts: 1
Joined: Thu May 03, 2012 4:31 pm

Postby eddie davis » Thu May 03, 2012 6:55 pm

Thank you for your post into the forum.

The answer to your question:
Is there any way to have data compare to evaluate which records in the child (shipping address table) to update?

Unfortunately the answer is no, if you synchronize just the one single table.

The data consistency is maintained by comparing and synchronizing BOTH tables in the relationship. Then the data in the target database will be exactly identical to the data in source.

Many Thanks
Eddie
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 998
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software


Return to SQL Data Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests