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 -> Create trigger on view with long raw column

Create trigger on view with long raw column

From: Lisa Tang <ltang7_at_yahoo.com>
Date: 5 Sep 2004 07:10:57 -0700
Message-ID: <cc133b78.0409050610.7b8c08e7@posting.google.com>


Hi,

I have a table t1 with a long raw column, and I need to create a view v1 with a long raw column being a function ff1 of the long raw column in t1. And I need to update t1 with reverse function rf1 whenever there is update, insert or delete to v1. My problem is it is not allowed to refer long raw from :new or :old, so I cannot get the long raw value when v1 is inserted, updated or deleted. Could anyone give me some advice or suggestions?

Let's repharse my problem as following:

Fix conditions:

create table t1 (col1 number, col2 long raw); create view v1
  as select col1,

            ff1(col2) /* ff1 also return long raw */
       from t1; 

Want to achieve:
create trigger v1_insert instead of insert on v1   declare
  begin
    insert into t1
(col1,

      col2)
     values

(:new.col1,
rf1(:new.col2)); /* I know :new.col2 is invalid */
  end;

The creation of above trigger will return: ORA-04093: references to columns of type LONG are not allowed in triggers

Welcome all kind of possible way. Many thanks!

Regards,
LT Received on Sun Sep 05 2004 - 09:10:57 CDT

Original text of this message

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