How to convert the XML to temp table


hi all,

i prepared xml through c# xml serializer. how change below xml temp table 

'<arrayofint xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema">

<int>63</int>

<int>13</int>

<int>12</int>

<int>15</int>

<int>16</int>

<int>35</int>

</arrayofint>' 

please help..

try this:

declare @xml xml  set @xml =  '<arrayofint xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema">   <int>63</int>   <int>13</int>   <int>12</int>   <int>15</int>   <int>16</int>   <int>35</int> </arrayofint>'   select a.c.value('.', 'int') @xml.nodes('arrayofint/int') a(c)



SQL Server  >  SQL Server XML



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........