Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Parsing XML IN SQL Server

DECLARE @XMLData XML = '
<oo_outbound_order>   
    <oo_master>
        <Code>123</Code>
        <Name>Branan</Name> 
    </oo_master> 
</oo_outbound_order>'

SELECT
    [Code] = Node.Data.value('Code', 'INT'),
    [Name] = Node.Data.value('Name', 'NVARCHAR(20)')
    FROM @XMLData.nodes('/oo_outbound_order/oo_master') Node(Data)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Parsing #XML #IN #SQL #Server
ADD COMMENT
Topic
Name
1+7 =