Options

Primary Key alternative

RowingWolfRowingWolf Posts: 4
Sometimes I don't want to use the primary key to compare two tables...sometimes its an alternative column. An example is a table we have where a description is what we would like to match on rather than the identity column.

Is there a way to specify this???

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    You don't necessarily need a primary key -- you can also use a column which has a unique constraint or a unique index. If you create a unique index on a column or columns other than the primary key column in SQL Server, you can choose this index as the 'comparison key' in the data comparison wizard.
  • Options
    Perhaps this is a feature of a newer version?? I'm running 3.1.8.276. I see that there is an update for 3.3.8....may I use that or must I purchase an upgrade?
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    It's a free upgrade that you can get from check for updates from the help menu.

    You should have this in 3.1.8, however. If you click 'compare' right away after choosing the database connection properties, then you don't see the place where you select the comparison key. You have to click Next-> and look at the center-column of the display with the list of tables.

    Keep in mind that you also need to put the unique index/constraint on the same column of the same table in both databases!
  • Options
    I didn't notice any of that -- it was off the right end of the grid and I didn't realize I could change it -- excellent!!

    Thanks Brian!! I'm looking forward to playing with it -- the results should be much better now!!!

    Paul
This discussion has been closed.