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

Home -> Community -> Usenet -> c.d.o.server -> HELP!! How to get CLOB column in trigger???

HELP!! How to get CLOB column in trigger???

From: <simrion_at_263.net>
Date: Thu, 04 Feb 1999 03:51:05 GMT
Message-ID: <79b5f6$km2$1@nnrp1.dejanews.com>


  I create a table having a CLOB column and create a INSERT trigger to get the inserted value to process.

SQL>CREATE TABLE employ(name VARCHAR2(80),resume CLOB);

CREATE OR REPLACE TRIGGER employ_trg
  AFTER INSERT ON employ FOR EACH ROW
DECLARE

  v_resume VARCHAR2(200);
  v_offset INTEGER:=1;
  v_amount INTEGER:=200;

BEGIN
  DBMS_LOB.READ(:new.resume,v_amount,v_offset,v_resume);   --process the name and resume
END;
/

but when I execute
SQL>INSERT INTO employ(name,resume) VALUES('Xu','BITI1999');

SQL*Plus reports error:

ORA-22275: invalid LOB locator specified
ORA-06512: at "SYS.DBMS_LOB", line 648
ORA-06512: at "SYSTEM.EMPLOY_TRG", line 6
ORA-04088: error during execution of trigger 'SYSTEM.EMPLOY_TRG'

Would you give me some help? Thanks a lot! Simrion
E-mail:simrion_at_263.net

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Feb 03 1999 - 21:51:05 CST

Original text of this message

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