Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2006, 03:08 PM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dequeue XML from AQ and Insert to Table

Using PL/SQL in a stored procedure, I need to dequeue a message from an Oracle AQ queue, parse the XML content and insert the data in an Oracle table. This is being done in Oracle 9.2.x.

The payload for the message consists of 2 attributes, APPLICATION_DATE (VARCHAR2(32) and MESSAGE_BODY (CLOB). The MESSAGE_BODY is an XML document. A sample of the message is
shown below:

(M_NAME=MSG_LAW_WR_CRE_UPD, <?xml version = "1.0"?>
<MSG_LAW_WR_CRE_UPD ID = "WMIS-4744" SRC_SYSTEM_CODE = "WMIS" SRC_SYSTEM_INSTANCE = "WMIS">
<WR:CMP_LAW_WR_CRE_UPD xmlns:WR = "WR" >
<WR:DATETIME>12/19/2005</WR:DATETIME>
<WR:RUSCODE>100</WR:RUSCODE>
<WR:WRNO>38213</WR:WRNO>
</WR:CMP_LAW_WR_CRE_UPD>
</MSG_LAW_WR_CRE_UPD>)

This message needs to be dequeued from a queue named INBOUND, parsed and inserted into
a table named INFO_TO_ACCT (CREATEDATE date, RUSCODE varchar2(10), WRNO number).

Any help would be appreciated.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert table records into another table. hewstone999 Access VBA 2 March 5th, 2008 11:01 AM
how to insert value in two table of two database shivendra012 SQL Server 2005 2 April 12th, 2007 10:37 AM
How to insert <br> in a table with this xml/xsl? andigra XSLT 1 September 22nd, 2006 07:01 AM
insert into new table from recordset bleutiger Classic ASP Databases 4 February 23rd, 2005 05:07 AM
How to insert an image to a table ahmadnajib MySQL 1 August 20th, 2004 01:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.