Options

De-select column for comparison, but still include it in INSERT

I have a situation where I might like to exclude a column from the comparison, but still want it included in a resulting INSERT statement that is ultimately deployed. The column itself is meaningless for what I'm doing and I don't want updates to it triggering downstream processes, but when I exclude it from the compare, it is skipped in the resulting insert statement generated for new records. Since the column is defined as NOT NULL, I'll need to assign a default or make it nullable on the target.

I'm not entirely certain I want to go this route, but I was surprised when the column was excluded from the insert statement when I disabled it from comparison.  I don't want a change to ONLY this column to trigger an update statement, but it still needs to be there on insert.
Tagged:

Answers

  • Options
    Eddie DEddie D Posts: 1,781 Rose Gold 5
    Hi, thank you for your forum post.

    When disabling a column via the 'Tables & Views' tab, it is disabled from both the comparison and subsequent deployment.

    Sadly the feature in SQL Data Compare to remove a column from the comparison and still include it in the subsequent deployment, simply does not exist within the tool.

    I recommend that you vote and comment on this UserVoice Forum Request.  Hopefully, it maybe seen in a future version of SQL Data Compare.

    Many thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.