dbTalk Databases Forums  

Create trigger on view with long raw column

comp.databases.oracle comp.databases.oracle


Discuss Create trigger on view with long raw column in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lisa Tang
 
Posts: n/a

Default Create trigger on view with long raw column - 09-05-2004 , 09:10 AM






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 ld, 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

Reply With Quote
  #2  
Old   
Hans Forbrich
 
Posts: n/a

Default Re: Create trigger on view with long raw column - 09-05-2004 , 09:36 AM






Lisa Tang cross-posted to several newsgroups:

Quote:
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
This is a comp.databases.oracle.server question. Responses will be found
there. Please do not cross-post within the comp.databases.oracle
heirarchy.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.