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: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
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: Tue Dec 03 11:56:16 CST 2024