Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> CLOB Problems with polymorphic insertion.
I am using an object-relational structure in Oracle 9i database to
create base class tables for ragged rowsets. Unfortunately, I am
having issues with the CLOB datatype on INSERT statements. My source
code is as follows:
Types
id NUMBER, created TIMESTAMP,
handle VARCHAR2( 20 ), password VARCHAR2( 20 )
title VARCHAR( 100 ),
defn CLOB, owner REF TUser
filename VARCHAR( 100 ),
thumbnail VARCHAR( 100 )
) NOT FINAL;
CREATE TYPE TNews UNDER TContent
(
teaser CLOB
) NOT FINAL;
Tables
CREATE TABLE tblContent OF TContent
(
owner SCOPE IS tblUser
);
Test Data
INSERT INTO tblContent VALUES
(
TNews
(
2, TIMESTAMP'2001-10-01 08:00:00.000', NULL,
'News',
'Oracle 9i provides some very interesting capabilities through
object/relational structure.', ( SELECT REF( usr ) FROM tblUser usr WHERE usr.id = 1 ),
'My thoughts on Oracle 9i'
COMMIT; The two tblContent insertion statements return errors of:
ORA-00932: inconsistent datatypes
on the CLOB columns. NULL will work in the literal's place without a problem.
Thanks in advance for any comments/suggestions.
Ghannodahn Kirrel
Librarian, The Infinity Citadel
http://www.icitadel.com
Received on Fri Nov 30 2001 - 14:34:58 CST
![]() |
![]() |