Viewing 3 posts - 1 through 3 (of 3 total)
Hi change your Extracting XML query
--Extracting Identity_id from XML
SET @Identity_id=(SELECT
c.value('(B/BVAL)[1]', 'varchar(128)') Identity_id
from @xmldata.nodes('(abcS/abc[@NAME="XXX"])[1]/abc_NODE[1]//AVAL') AS X(c))
November 14, 2013 at 9:19 pm
Hi,
Try these
Declare @id bigint = 1
Declare @string as varchar(100) ='100,200,300,400,500'
DECLARE @testXML XML
SET @testXML = N'<test>' + REPLACE(@string,',','</test><test>') + '</test>'
SELECT @id [id],node.value('.','varchar(100)') as [No]
FROM @testXML.nodes('/test') as records(node)
October 21, 2013 at 9:50 pm
Thanks for explain precedence logic. Now I understand it perfectly
June 23, 2010 at 12:59 am
Viewing 3 posts - 1 through 3 (of 3 total)