Data Comparison Failure

afbirdafbird Posts: 3
I have two tables with the exact same definition. Table A has 49409 records. Table B has 49410 records which are also present in Table A. Nonetheless, when I compare both tables, SQL Data Compare states that only 26517 of them are identical and that Table A is missing 22893 records and contains 22892 additional records when compared to Table B. I verified the Collation Name on the columns and made sure that the key field had the same size. Both DBs have ANSI PADDING off. I have also set the Trim Trailing Spaces option on.
Other tools find no difference between the tables but I prefer your interface and speed of execution and want to make it work.

Any Help?

Comments

  • Oops! I meant to say, Table B has 49410 records of which 49409 are also in Table A.

    Sorry.
  • Hi

    This should not be happening. I will send you a personal message to try and help resolve this problem.

    Regards
    Dan
    Daniel Handley
    Red Gate Software Ltd
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Data Compare has an option now called 'trim trailing spaces' that can help with this. If you have a primary key column on one table that is a varchar and it's a char datatype on the other, you can heve this problem because the char column will always be padded with trailing spaces, leading to rows that do not match when they really should match.
This discussion has been closed.