Options

why arent all the columns in the insert??

JamesShawJamesShaw Posts: 7
I'm missing something, please help me understand how to use data compare!

I have two databases, old and new.
I want to move the new records into the old one.
I want to compare by the two columns that are unique and ignore the other 20 columns (for speed if nothing else)

However, although dc finds the 80,000 rows to copy over, its insert statements only include the columns I compared - why?? Obviously every insert fails because there aren't defaults for the others (nor should they be needed!)

What am I doing wrong?

Thanks!

Comments

  • Options
    Hi,

    I'm guessing from what you describe that you've deselected the 20 non-key columns in the "columns in comparison" part of the project configuration? If so, that'll be why your inserts are only showing the key columns.

    When we do a comparison, we only actually compare based on the key columns you select (shown with a key icon in the column list), so there's no need to un-check the other columns there. Doing that will mean we don't actually pull the data for them out of the database, hence why you're not seeing it in your insert statements.

    The main reason for un-checking columns there would be if you didn't want to move certain fields over, such as passwords from a live system that you don't want to push back over into a QA server or similar.

    Hope that helps,
    Robert
    Robert Chipperfield
    Red Gate
  • Options
    Hi,

    What if you don't want certain columns to be used for comparison purposes, but you would still like for them to be inserted if a row doesn't match for other reasons?

    Is this possible using SQL Data Compare 6.1.1.308?

    Thanks,

    David Andres
Sign In or Register to comment.