Kerala Microsoft Users Group
Pay $0.00 for Windows Server 2008 and SQL Server 2008 licenses.

Parsing XML file in sql server 2005 and inserting the xml tag values into table

Latest post 01-21-2010 8:06 AM by Amal. 2 replies.
  • 01-21-2010 2:07 AM

    • Giri
    • Top 75 Contributor
      Male
    • Joined on 02-21-2009
    • Trivandrum
    • Newbie
    • Points 200

    Smile [:)] Parsing XML file in sql server 2005 and inserting the xml tag values into table

    hi. 

          I have an xml file with lotes of tags.i want to pass the XML file in to sql2005 procedure. and want to insert  the XML tag values in to DB. How can i do it with sql server 2005...can u help me...

    the sample input file is like

     <Body>

               <MedicationDispensed>                

                      <DrugDescription>PREVACID</DrugDescription>
                      <DrugCoded>
                            <ProductCode>00300304613</ProductCode>
                               <Strength>30MG</Strength>
                     </DrugCoded>
               </MedicationDispensed>


          <MedicationDispensed>
            <DrugDescription>PREVACID</DrugDescription>
            <DrugCoded>
               <ProductCode>00300304613</ProductCode>
               <Strength>30MG</Strength>
            </DrugCoded>
           </MedicationDispensed>          

     </Body> 

     

    • Post Points: 45
  • 01-21-2010 2:56 AM In reply to

    Re: Parsing XML file in sql server 2005 and inserting the xml tag values into table

    It is easy to manipulate xml from sql.

    Btw, check this if helpful - http://support.microsoft.com/kb/555266

    PraVeeN
    Microsoft MVP
    blog.ninethsense.com | kidoos.net

    • Post Points: 5
  • 01-21-2010 8:06 AM In reply to

    Re: Parsing XML file in sql server 2005 and inserting the xml tag values into table

    There are lot resources regarding the xml datatype in SQL 2005.

    For a start please go thru the links below

    http://weblogs.sqlteam.com/travisl/archive/2005/01/04/3931.aspx

    http://www.sql-server-performance.com/articles/dev/xml_data_2005_p1.aspx

     

    Amal

    • Post Points: 5
Page 1 of 1 (3 items) | RSS
Pay $0.00 for Windows Server 2008 and SQL Server 2008 licenses.