how to Import XML data into one single table in SQL server using SSIS

  • Hi,

    I have a XML file which has many nodes and many columns. I want to get most of the columns from all nodes into one single table in sql server.

    i have used XML source task but this task splits the data into multiple tasks. I cannot use merge because columns cannot be joined.

    how can I do this in SSIS? I just want all the XMl columns and data in one single table. Is there anyway we can do this?

    Any help is appreciated!!

  • OPENXML should work just fine for this task.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • Hi,

    OPENXML works fine if all have single parent node.

    But I might want columns for different nodes. Do we have any option?

    Thanks

  • hegdesuchi (9/9/2016)


    Hi,

    OPENXML works fine if all have single parent node.

    But I might want columns for different nodes. Do we have any option?

    Thanks

    Post a sample of the XML you're working with and desired results. I'm pretty sure I can show you a few ways to tackle this.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 4 posts - 1 through 3 (of 3 total)

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