Home » SQL & PL/SQL » SQL & PL/SQL » how to directly pass xml value to clob variable
how to directly pass xml value to clob variable [message #246112] Wed, 20 June 2007 00:37 Go to next message
kukreja
Messages: 33
Registered: February 2007
Member
Hi

In my procedure, if i am directly assigning the xml value to clob
l_clob := '<ROWSET>
<ROW>
<TESTVALUE1>....</TESTVALUE>
.
.
.
</ROW>
</ROWSET>';

I am getting error

ERROR at line 7:
ORA-06550: line 7, column 13:
PLS-00172: string literal too long

Again

if I assigned it to xmltype variable first
l_xml xmltype :=xmltype('<ROWSET>
<ROW>
<TESTVALUE1>....</TESTVALUE>
.
.
.
</ROW>
</ROWSET>');
l_clob := l_xml.getclobval();

got same error
PLS-00172: string literal too long

also size of xml is less than 2Gb.

Please help me in solving this problem.

Regards
Kukreja
Re: how to directly pass xml value to clob variable [message #246120 is a reply to message #246112] Wed, 20 June 2007 01:02 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
A string litteral is limited to 32767 bytes.
Break your strings in several smaller ones and concatenate them.

In addition:
Please read and follow How to format your posts and
How to get a quick answer to your question: TIPS AND TRICKS.
Please always post your Oracle version (4 decimals).


Regards
Michel
Previous Topic: cartesian product?????
Next Topic: How to truncate the minutes and seconds from a date field
Goto Forum:
  


Current Time: Fri Dec 09 02:04:23 CST 2016

Total time taken to generate the page: 0.09362 seconds