Home » SQL & PL/SQL » SQL & PL/SQL » XMLTYPE to CLOB (oracle 10g)
XMLTYPE to CLOB [message #438619] Mon, 11 January 2010 04:02 Go to next message
ora_2007
Messages: 430
Registered: July 2007
Location: Mumbai
Senior Member
I have 1 TEST1 table with col1 XMLTYPE column.
TEST2 table with col1 CLOBcomlumn

create table TEST1 (col1 XMLTYPE);

create table TEST2 (col1 CLOB);

I want to select from TEST1 table and store it into TEST2.
Please tell me how i can convert XMLTYPE to CLOB?

Thanks,
Re: XMLTYPE to CLOB [message #438620 is a reply to message #438619] Mon, 11 January 2010 04:09 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
INSERT INTO test2(col1)
SELECT to_clob(col1) from TEST1;
Re: XMLTYPE to CLOB [message #438622 is a reply to message #438620] Mon, 11 January 2010 04:36 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Jrowbottom`s suggestion is the one You required...In addition

Search for these...
1) getClobVal()
2) XMLDOM Package.
This One also helps you.

sriram.
Re: XMLTYPE to CLOB [message #438627 is a reply to message #438619] Mon, 11 January 2010 04:59 Go to previous messageGo to next message
ora_2007
Messages: 430
Registered: July 2007
Location: Mumbai
Senior Member
This woeked for me.

insert into test2 (col1)
select t.col1.getclobval ()
from test1 t


Thanks,
Re: XMLTYPE to CLOB [message #438628 is a reply to message #438627] Mon, 11 January 2010 05:04 Go to previous message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Thanks for the feedback
GOOD LUCK
sriram Smile
Previous Topic: Creating more than 1 trigger
Next Topic: how to find column name having particular value
Goto Forum:
  


Current Time: Thu Sep 29 03:57:13 CDT 2016

Total time taken to generate the page: 0.09496 seconds