XMLTYPE.getClobVal() help 9i vs. 11G [message #483617] |
Tue, 23 November 2010 09:03  |
 |
ocdeveloper
Messages: 9 Registered: November 2010
|
Junior Member |
|
|
Hi all,
I have some pl/sql I am using to update an xmltype column.
DECLARE
lob1 CLOB;
BEGIN
SELECT e.xml_col.getClobVal() INTO lob1 FROM "XML"."XML_TABLE" e WHERE KEY_COL=3 ;
DBMS_LOB.APPEND(lob1, 'is a test node</test>');
END;
On 11G this works well, but on 9i I get a ORA-22275: invalid LOB locator specified error. I have tried many different approaches but I'm stumped now. Can anyone help please?
|
|
|
|
|
|
|
|
Re: XMLTYPE.getClobVal() help 9i vs. 11G [message #483630 is a reply to message #483623] |
Tue, 23 November 2010 10:50   |
 |
Michel Cadot
Messages: 68758 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
This does not change my answer or rather initialize the lob using empty_clob function.
Use SQL*Plus and copy and paste your session, the whole one including table creation, insert statements and PL/SQL block execution.
Before, Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Regards
Michel
[Updated on: Tue, 23 November 2010 10:59] Report message to a moderator
|
|
|
|
|
|
|
Re: XMLTYPE.getClobVal() help 9i vs. 11G [message #483904 is a reply to message #483638] |
Thu, 25 November 2010 07:56   |
 |
ocdeveloper
Messages: 9 Registered: November 2010
|
Junior Member |
|
|
Michel Cadot wrote on Tue, 23 November 2010 11:58As I don't see what you have I can't help you more. Please copy and paste your session as I did it.
As you have a 9.2.0.1 version, I advise you to upgrade to the latest patchset.
Regards
Michel
Hi Michel. Here is a copy of my session:
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> CREATE TABLE XML(key_col number primary key, xml_col XMLTYPE);
Table created.
SQL> INSERT INTO XML VALUES (0, XMLTYPE('<x>val</x>'));
1 row created.
SQL> declare
2 lob1 clob;
3 begin
4 dbms_lob.createtemporary (lob_loc=>lob1, cache=>true, dur=>dbms_lob.call);
5 SELECT e.xml_col.getClobVal() INTO lob1 from XML e WHERE key_col = 0;
6 DBMS_LOB.APPEND(lob1, 'is a test node</test>');
7 end;
8 /
declare
*
ERROR at line 1:
ORA-22275: invalid LOB locator specified
ORA-06512: at "SYS.DBMS_LOB", line 347
ORA-06512: at line 6
SQL>
|
|
|
|