Importing XML into SQL Tables using SSIS package

  • Hi everyone,

    I have a XML file which consists of data like this:

    <Individuals>
    <Individual>
    <UniqueID>1001</UniqueID>
    <Name>Ben</Name>
    </Individual>
    <Addresses>
    <Address>
    <Address_Line_1>House no 280</Address_Line_1>
    <Address_Line_2>NY</Address_Line_2>
    <Country>US</Country>
    </Address>
    <Address>
    <Address_Line_1>street 100</Address_Line_1>
    <Address_Line_2>California</Address_Line_2>
    <Country>US</Country>
    </Address>
    </Addresses>
    </Individuals>

     

    I have designed ssis package and

    Now I am able to move Individual data to Individual table.

    And Address data to Address table during the import process.

    I have a primary key in my Individual table (id_pk) which is auto-generated:

    Address table in SQL:

     

    I am having trouble moving the main id_pk from individual into address table.

    I have designed a update query but its taking too long to update in to address table.

    What would be the best solution?

Viewing 0 posts

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