Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: Need Help on XML parsing

    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))

  • RE: Looping Comma separated string

    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)

  • RE: coalesce and nullif

    Thanks for explain precedence logic. Now I understand it perfectly

Viewing 3 posts - 1 through 3 (of 3 total)