How to select XML Data as table format in sql server
DECLARE @ONERROR INT
DECLARE @idoc INT
declare @xmlData NTEXT
set @xmlData ='some XML string '
EXEC sp_xml_preparedocument @idoc OUTPUT, @xmlData
set @str = '//Sheet' + cast(@TopSheetID as varchar(50)) + '/WBProducts'
Select * From OpenXML (@idoc,@str,3)
WITH tblProcess
DECLARE @idoc INT
declare @xmlData NTEXT
set @xmlData ='some XML string '
EXEC sp_xml_preparedocument @idoc OUTPUT, @xmlData
set @str = '//Sheet' + cast(@TopSheetID as varchar(50)) + '/WBProducts'
Select * From OpenXML (@idoc,@str,3)
WITH tblProcess
Comments
Post a Comment