Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to create CLOB within ANYDATA ?

How to create CLOB within ANYDATA ?

From: Steve Herb <Steve.Herb_at_desy.de>
Date: Sat, 12 Nov 2005 09:21:13 +0100
Message-ID: <dl48p5$bcl8$1@claire.desy.de>


Hi: I am attempting to use the ANYDATA type from within Oracle 9i (from SQL, mostly via JDBC) and find documentation very sparse. This line works:
INSERT INTO ATABLE VALUES (123,SYS.ANYDATA.CONVERTNUMBER(3.1416)) but an attempt with CLOB
INSERT INTO ATABLE VALUES (123,SYS.ANYDATA.CONVERTCLOB(EMPTY_CLOB())) or
INSERT INTO ATABLE VALUES (123,SYS.ANYDATA.CONVERTCLOB('abcde')) gives error:
"Connection fails: ORA-22370: incorrect usage of method AnyData Insert"

I would be working with 'internal' CLOBs, and according to the Oracle docs, EMPTY_CLOB() should create a new CLOB. Must I create a CLOB by some other means before I insert it in an ANYDATA column, and if yes, is it possible to do this plus the insert within a single SQL statement? Or with a stored procedure, if necessary? I am just getting started with Oracle, but have the impression that I am heading into a swampy region of the terrain.

                          thanks,  Steve Herb
Received on Sat Nov 12 2005 - 02:21:13 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US