Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

convert xml data to table format sql server

SELECT  
       Tbl.Col.value('IdInvernadero[1]', 'smallint'),  
       Tbl.Col.value('IdProducto[1]', 'smallint'),  
       Tbl.Col.value('IdCaracteristica1[1]', 'smallint'),
       Tbl.Col.value('IdCaracteristica2[1]', 'smallint'),
       Tbl.Col.value('Cantidad[1]', 'int'),
       Tbl.Col.value('Folio[1]', 'varchar(7)')
FROM   @xml.nodes('//row') Tbl(Col)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #xml #data #table #format #sql #server
ADD COMMENT
Topic
Name
8+2 =