i have a table A
id -------- name -------------------C (xml data)
1 -----------a---------------------<note>
<to>AKI</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
2------------ b--------------------<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
3------------ c--------------------<note>
<to>Joe</to>
<from>MARY</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>"
now i want to fetch value of <to> and <from> tags and enter them to other temporary table
I am working on oracle 11g
i tried using
insert into <your_temp_table>
select a.id, a.name,
extract(a.c, '/note/to').getStringVal() as to,
extract(a.c, '/note/from')getStringVal() as from
from A a;
but im getting error
ORA-00932: inconsistent datatypes: expected - got -
Any Suggestions ???