Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OPENXML, sp_xml_preparedocument, sp_xml_removedocument equivalent to Oracle

user4028691Sep 26 2014 — edited Sep 26 2014

Hi,

I have stored procedure in MSSQL, that need to be translated to Oracle.

SP in MSSQL

CREATE PROCEDURE [dbo].[pptChnlGrpChnl_d_xml]

@xmlOptinChannel nvarchar(max) --<TeamProfile><UserProfile companyTeamID="" userID="" /></TeamProfile>


AS

DECLARE @docid int

DECLARE @TableOptins table (

  OptinChannelGroupID int,

  ChannelID int

)


EXEC sp_xml_preparedocument @docid OUTPUT, @xmlOptinChannel

  -- Populate temp table with user(s) records for removal

  INSERT INTO @TableOptins (OptinChannelGroupID, ChannelID)

  SELECT tm.OptinChannelGroupID, tm.ChannelID

  FROM OPENXML (@docid, '/GroupChannels/GroupProfile')

  WITH (OptinChannelGroupID int,

             ChannelID int) tm

EXEC sp_xml_removedocument @docid

Return 0

Any suggestion?

This post has been answered by odie_63 on Sep 26 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2014
Added on Sep 26 2014
3 comments
1,958 views