Home » SQL & PL/SQL » SQL & PL/SQL » How to save output to a table (Oracle 10g)
How to save output to a table [message #351428] Tue, 30 September 2008 16:09 Go to next message
HelloKitty79
Messages: 6
Registered: September 2008
Location: Washington, DC
Junior Member
Hi,

I am using PL/SQL to generate an XML file from a database. The XML is basic and straightforward; but how can I save the entire output into a table in the database? The procedure contains several loops between the XML in order to loop through records.
Re: How to save output to a table [message #351439 is a reply to message #351428] Tue, 30 September 2008 19:39 Go to previous messageGo to next message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
Try using CLOB if you want to save the XML into a table.
Re: How to save output to a table [message #351448 is a reply to message #351439] Tue, 30 September 2008 20:47 Go to previous messageGo to next message
HelloKitty79
Messages: 6
Registered: September 2008
Location: Washington, DC
Junior Member
Thanks, but how should I use it? The field that I wish to insert the xml output is a CLOB. Should I use APPEND? I am fairly new to PL SQL.
Re: How to save output to a table [message #351458 is a reply to message #351448] Tue, 30 September 2008 23:37 Go to previous messageGo to next message
rajatratewal
Messages: 507
Registered: March 2008
Location: INDIA
Senior Member
Oracle provides XMLTYPE datatype.Try using that one.
It also provide certain inbuilt functions to manipulate
the XML stored.No CLOB required to store XML.

Regards,
Rajat
Re: How to save output to a table [message #351761 is a reply to message #351458] Thu, 02 October 2008 21:19 Go to previous messageGo to next message
HelloKitty79
Messages: 6
Registered: September 2008
Location: Washington, DC
Junior Member
Thanks for the info. I was reading about it, wondering if it might help.
Re: How to save output to a table [message #351773 is a reply to message #351761] Fri, 03 October 2008 00:42 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You might have more help if you explain your problem with more details.
For instance, what you do, what you finaly want, possibly with an example.

Regards
Michel
Re: How to save output to a table [message #351960 is a reply to message #351773] Fri, 03 October 2008 18:25 Go to previous message
HelloKitty79
Messages: 6
Registered: September 2008
Location: Washington, DC
Junior Member
Hi,

I was able to figure it out. I used dbms_lob.append. Thanks.
Previous Topic: sequence.nextval and sequence.currval
Next Topic: Can you tell me the error reason in the script
Goto Forum:
  


Current Time: Mon Feb 17 22:20:51 CST 2025