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
Post a Comment