Link to home
Start Free TrialLog in
Avatar of Omer-Pitou
Omer-Pitou

asked on

MS SQL - Synchronize 2 tables definition

Hi,
Is there any stored procedure that can help to synchronize 2 tables definitions?
Let say I have table A and I want fields in table B (not existing in table A) to be added to table A.
And if any datatype change is picked up on common fields, adjust fields in table A
Only at table definition.
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
and good luck with automating "And if any datatype change is picked up on common fields, adjust fields in table A"

How broad is that requirement.

e.g. From varchar to datetime? From varchar(250) to varchar(4)? (both are likely to have exceptions in the data)
Avatar of Omer-Pitou
Omer-Pitou

ASKER

It can be done. In this case you can force the column to be truncated. It is just a lot of coding.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial