Problem with OPENXML

  • I have the following setup

  • In the path statement you have to put the lower level to get it to look at all the rows.

    and then in the With clause indicate text() function to have the Value pulled.

     

    alter Procedure [dbo].[Wty_Warranty_S]

    @Warranty_Type_ID  nvarchar(2000)

    as

    Declare @XMLHandle Int

     Exec sp_xml_preparedocument @XMLHandle OUTPUT, @Warranty_Type_ID

    Select *

    from OPENXML(@XMLHandle, 'WTS/WT',2)

    With (Warranty_TYpe_ID  varchar(20) 'text()') AS Params

    Exec sp_xml_removedocument @XMLHandle

    GO

    Exec Wty_Warranty_S '<WTS>

    <WT>2</WT>

    <WT>50</WT>

    <WT>48</WT>

    </WTS>'

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

You must be logged in to reply to this topic. Login to reply