locked
Assigning Surrogate Keys RRS feed

  • Question

  • How do i assign Surrogate Keys to the records coming from Table B. if identity is not set already on the table A, and table A is populated with surrogate key. I am bringing more records to append in Table A from Table B. How should i solve this problem in SSIS?

     

    Wednesday, May 12, 2010 12:27 AM

Answers

  • Phil Brammer has a nice post about generating surrogate keys in SSIS: http://www.ssistalk.com/2007/02/20/generating-surrogate-keys/

    Basically, you retrieve the Max id from table A, and then use that as the seed for incrementing new keys in the data flow using a Script component.


    John Welch | www.varigence.com | www.agilebi.com | ssisUnit.codeplex.com
    • Proposed as answer by Todd McDermid Wednesday, May 12, 2010 5:35 AM
    • Marked as answer by Farrukh Lala Wednesday, May 12, 2010 8:40 PM
    Wednesday, May 12, 2010 12:46 AM