My Oracle Support Banner

ORA-22816 When Loading Data Into a View With CLOB Column and an INSTEAD OF Trigger (Doc ID 795956.1)

Last updated on MARCH 04, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 8.1.7.1 to 11.1.0.7 [Release 8.1.7 to 11.1]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
This problem can occur on any platform.

NOTE: In the testcase content below, the user information and metadata used represents fictitious data. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

Symptoms

You try to load data using SQL*Loader into a view with a LOB that has an instead of trigger. This ends with error message:

Record 1: Rejected - Error on table TEST_CLOB_LOAD_VW, column ID1.
ORA-22816: unsupported feature with RETURNING clause


The next test demonstrates this:

create sequence test_clob_seq start with 1;

create table test_clob
(
   id1 number not null,
   c1  clob   not null
);

create view test_clob_load_vw as
select id1, c1
from   test_clob;

create or replace trigger test_clob_load_trig
instead of insert on test_clob_load_vw
for each row
begin
   insert into test_clob (id1, c1) values (:new.id1, :new.c1);
end;
/


The control file prepared for SQL*Loader is:

load data
infile *
append
into table test_clob_load_vw
fields terminated by ',' optionally enclosed by '"'
(
   id1 expression "test_clob_seq.nextval",
   c1  char(10000)
)
begindata
"this is a test to show that the instead of trigger breaks with clobs and sqlldr"

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.