Options

Using SQl data compare assigning custom comparison keys

mocimoci Posts: 3
Hi I am using SQL data Compare to on a database one is dated 21 and the other is 23 Jan.

I am not able to compare a few tables so it specifies that I explicitly give a custom comparison key
a couple of my tables don't have primary keys or any other unique keys which column should i select in this case.

Comments

  • Options
    Hi there,

    You can select to set a number of columns for your comparison key, thus creating a composite comparison key.

    There may not be data in one of these columns that is unique, however when you set the key on a number of columns, you can choose those columns where the combination of information gathered will be unique.

    Hope that helps!

    Pete
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
  • Options
    What if I dont have any unique combinations do i select all the available columns?

    The question here is that I might have null values in the column I select how does SQL data compare use these comparison keys that I provide?

    else there is also a column at the end stating the number of columns to be compared whats that for?
  • Options
    Hi there,

    I think this is best answered via the support call that we have open for you. Please can you send me screenshots of what you are unsure of along with some further information with the reference number F0030960 in the subject line.

    Many thanks!

    Pete
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
  • Options
    moci wrote:
    Hi I am using SQL data Compare to on a database one is dated 21 and the other is 23 Jan.

    I am not able to compare a few tables so it specifies that I explicitly give a custom comparison key
    a couple of my tables don't have primary keys or any other unique keys which column should i select in this case.
    You need to select a column that ensures accurate comparison. The appropriate column should be a key column. If no key column exists, you must select a combination of columns.The only time you can get away with not choosing an appropriate column is if one table is empty and you are populating it. A good set of columns to use would potentially include a date column and a candidate key.
Sign In or Register to comment.