Red Gate forums :: View topic - Comparing two tables with different names
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare Previous Versions
SQL Data Compare Previous Versions forum

Comparing two tables with different names

Search in SQL Data Compare Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
notjust



Joined: 21 Jun 2011
Posts: 1

PostPosted: Tue Jun 21, 2011 2:58 pm    Post subject: Comparing two tables with different names Reply with quote

I want to compare two tables with different names in two separate databases. The columns and data should be identical except my target has an additional column which I would like to avoid.

I see the option to Map the table, but when I highlight the table, the map button remains greyed out.


I have 2 questions:

1. What are the steps for comparing tables with different names
2. How can I filter out the columns I wish to compare.
Back to top
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 757
Location: Red Gate Software Ltd.

PostPosted: Tue Jun 21, 2011 5:45 pm    Post subject: Reply with quote

Thanks for your post.

I'm afraid it's bad news for both questions.

1. There is no way to custom map differently named tables in SQL Compare. It's something we would like to add to the tool, but the problem is that it causes too many issues with dependencies. i.e. every reference to the custom mapped object would also have to be rewritten to the new name.

2. It's not possible to exclude specific columns as they're not treated as objects in their own right. When you compare a table, all columns will be considered.
_________________
Chris
Back to top
View user's profile Send private message Send e-mail
JamieA



Joined: 28 Jul 2011
Posts: 9
Location: United Kingdom

PostPosted: Thu Jul 28, 2011 11:43 am    Post subject: Reply with quote

I needed a way of doing this before I had SQL Compare 9, so I wrote a script based on the one here:

http://weblogs.sqlteam.com/jeffs/archive/2004/11/10/2737.aspx

I parameterised it so that I could give it two table names and off it would go.

You've probably done this yourself by now... but thought I'd share it!


Jamie
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group