Options

Comparing two tables with different names

notjustnotjust Posts: 2
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.

Comments

  • Options
    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
  • Options
    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/archiv ... /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
Sign In or Register to comment.