CDC to find what column change

  • I have a CDC enabled on a table and every week I do incremental load to a static table Table1_CT_Incremetal . I have data worth of few months on this table. Now from this table I have to insert the data to a new History table that looks something like this

    changedColName BeforeVal AfterVal Transaction time

    How can I find what column value( name of the column updated) changed .

  • You can use __$update_mask column with sys.fn_cdc_is_bit_set CDC function to find columns which were updated for a particular record.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply