Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> How to create CLOB within ANYDATA ?
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 HerbReceived on Sat Nov 12 2005 - 02:21:13 CST