What are the challenges you face when working across database platforms? Take the survey
Options

How to Compare different tables in same Database

I have a DB with two tables where the one is a backup of the other one.
How can I compare the two tables using SQL Data compare.

Best Answer

  • Options
    BrainDonorBrainDonor Posts: 55 Silver 2
    Data Compare does it's best to map tables from the Source to the Target. So, it is a two-stage process to override this - you need to unmap what it has mapped and tell it to map the tables as you want it to.
    In my example below I'm using a copy of an old ASP_State database and I have copied ASPTempSessions to ASPTempSessions_Copy. Currently, Data Compare has mapped the tables as you would expect.
    First, I select ASPTempSessions and click on the 'unmap' button.

    Then I select ASPStateTempSessions_Copy and do the same. This gives me a screen that shows tables that are no longer mappedy, in the lower half of the dialog.

    Now, I can select the two tables that I want to compare against each other.

    And then press 'Map'. This will then the two tables mapped to each other, so you can select them for camparison.

Answers

  • Options
    If you're using Data Compare via the GUI, it allows you to select the same database for both the Source and the Target. Then you can select the two tables that you wish to compare.
    I've used it this way for checking how data has changed, after a test run of an update.
  • Options
    Here what I did.
    I selected my DB as Source and Target
    Clicked on tap Tables and Views.
    How can I select the two tables I marked in the picture ? 

Sign In or Register to comment.