Insert records from XML into tables

  • I have to fetch record from xml file and insert into tables.

    How can i do:

    The structure is relatioship (see attached file...)

    and xml data is following :

    ---XML---

    _____________________________________________________________________________________________________________
    Paresh Prajapati
    ➡ +919924626601
    http://paresh-sqldba.blogspot.com/[/url]
    LinkedIn | Tweet Me | FaceBook | Brijj

  • If you're sql server is 2005 you can use openxml() function to the data from your xml and insert it to your table. You could also use xquery to query and modify your xml data. sql 2005 also has xml data type

    Albert B. Matubis
    Database Administrator: Trend Micro PH
    MCP. MCAD. MCDBA. MCT
    MCTS: SQL Server 2005
    MCTS: Business Intelligence
    MCITP: Database Administrator
    MCITP: Business Intelligence Applications Developer

  • You posted XML got eaten by the security filters. Please repost it as a .txt attachment.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • I want to insert data from XML File, which has not fixed format.

    But XML file has first node is fix and which is parenr node , but except first node others child nodes are not fix.

    So, how can i read all data of parent and all child nodes from XML?

    Please help me.

    Thanks,

    _____________________________________________________________________________________________________________
    Paresh Prajapati
    ➡ +919924626601
    http://paresh-sqldba.blogspot.com/[/url]
    LinkedIn | Tweet Me | FaceBook | Brijj

  • I am still waiting for you to post the XML as an attachment as I requested.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

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

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