Import XML Data into SQL Server database using SSIS package?????

  • Is possible to send me a package sample to import XML files to table?

  • It's easy without SSIS. Here's a demo

    --make the table you need

    CREATE TABLE XmlImportTesting(

    xmlFileName VARCHAR(300) NOT NULL,

    xml_data XML NOT NULL

    )

    GO

    DECLARE @xmlFileName VARCHAR(300)

    SELECT @xmlFileName = '\\aitl-testsql1\e$\EProfTestXML\Item3.txt'

    -- dynamic sql is just so we can use @xmlFileName variable in OPENROWSET

    EXEC('INSERT INTO XmlImportTesting(xmlFileName,xml_data)

    SELECT ''' + @xmlFileName + ''', xmlData

    FROM (

    SELECT *

    FROM OPENROWSET (BULK ''' + @xmlFileName + ''' , SINGLE_BLOB) AS XMLDATA

    ) AS FileImport (XMLDATA)

    ')

    GO

    SELECT * FROM XmlImportTesting

    DROP TABLE XmlImportTesting

  • @tim-2

    I have the same Problem ,

    I tried to get the datastructure same as the XML file but how

    Shall i get the data From the xml file to Table ?

    Any idea ??

  • Divya,

    Can you send me the application sample?

    thanks

    fad

  • Hi

    Can u send a sample xml file and the details of the table u want to load the data .So that I can help you.

  • ramesh.sripathi-823300 (5/5/2009)


    Hi

    I am working on SSIS

    I have an XML file that consists of nearly 5 tables of data,I have one XSD generated based on the XML file.

    I need to populate the data present in XML file into corresponding five tables

    Please help me out how to resolve this issue

    I have the same question. Did you get solution?

Viewing 6 posts - 16 through 20 (of 20 total)

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