Merge table schema differences
bassofa
Posts: 1 New member
in SQL Compare
Hello guys,
I'm new to Redgate SQL Compare. I'm currently trying to compare two tables in different databases and the action I'll like to take is, if there are differences in the columns in each table, I will like them to be merged into one table with all columns on both tables in one script. Is there a way I can accomplish this? May be an example will help:
Server1.Database1.Table1 has columns (Column 1, Column 2, Column 3) and Server2.Database2.Table1 has (Column 1, Column2, Column 4). I want the deployment after the comparison to have table1 as (Column 1, Column 2, Column 3, Column 4). Is that doable?
I'm new to Redgate SQL Compare. I'm currently trying to compare two tables in different databases and the action I'll like to take is, if there are differences in the columns in each table, I will like them to be merged into one table with all columns on both tables in one script. Is there a way I can accomplish this? May be an example will help:
Server1.Database1.Table1 has columns (Column 1, Column 2, Column 3) and Server2.Database2.Table1 has (Column 1, Column2, Column 4). I want the deployment after the comparison to have table1 as (Column 1, Column 2, Column 3, Column 4). Is that doable?
Tagged:
Answers
not with one click, actually. Did you notice the "switch" button between the source and the destination database? You can compare S1.DB1.TB1 (-->) S2.DB2.TB2 applying only the additions/modifications and, then, switch and re-compare with S2.DB2.TB2 (-->) S1.DB1.TB1 only with deploying the additions/modifications. In both the comparison sessions, you must uncheck the "only in the right" objects (deletions).
hope this helps,
CTO @ Engage IT Services s.r.l.
Database Administrator and Team Leader
Microsoft MVP - Data Platform
Staff member of getlatestversion.it community
personal website | blog
https://redgate.uservoice.com/forums/141379-sql-compare/suggestions/3331444-drop
Redgate Software