This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE PROC [dbo].[usp_InsertDemoXML] @xmlBin AS varbinary(max) | |
AS | |
BEGIN | |
declare @xml xml = convert(xml,@xmlBin) | |
INSERT INTO Demo ([Key],[Value]) | |
SELECT | |
[key] = x.v.value('key[1]','int'), | |
[Value] = x.v.value('value[1]','varchar(50)') | |
FROM @xml.nodes('/table/row') x(v) | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment