Skip to Main Content

Oracle Database Discussions

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!

insert xml string to clob column. ??

Sunil K.Jan 16 2015 — edited Jan 18 2015

https://drive.google.com/file/d/0BwAVQqYmX0-zMHZiS1F0SVdOMmc/view?usp=sharing

DECLARE

        v_clob CLOB := to_clob('xml string from local file'); --pls. download xml file from above url;

        stmt NVARCHAR2(500) := 'INSERT INTO TEST(XMLDATA) VALUES(:x)';

BEGIN

        EXECUTE IMMEDIATE stmt USING v_clob;

END;

if i use xmltype then i can use XMLType(bfilename('test_dir', 'data.xml'), nls_charset_id('AL32UTF8'))

but i have to use clob to store xml string. because oracle xmltype is unable to parse correctly this xml data.;

This post has been answered by John Stegeman on Jan 16 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2015
Added on Jan 16 2015
6 comments
1,737 views