Solved

Instead of delete -  triggers

Posted on 2007-11-20
6
458 Views
Last Modified: 2013-12-19
Hi Experts ..

Is it possible to pass parameters to trigger from stored procedure??

I have instead of delete trigger on a *view*, this trigger delete a record from Table1 and insert record in table2, I want to pass parameters (other than the parameters used to delete record in table1)  used to insert a record in Table 2 table.

Is that still possible?
0
Comment
Question by:DrAske
  • 3
  • 3
6 Comments
 
LVL 7

Accepted Solution

by:
multithreading earned 500 total points
Comment Utility
No, at least not directly, and if you do it indirectly you are asking for trouble, because there would be many cases where the delete would happen without your indirect path having been setup.
0
 
LVL 9

Author Comment

by:DrAske
Comment Utility
could you please explain a little more about the *indirect* approach??
0
 
LVL 7

Expert Comment

by:multithreading
Comment Utility
No. It's WAY too scary.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 9

Author Comment

by:DrAske
Comment Utility
nice answer :o)

could you please tell me why the following does not work??

In the stored procedure:

Delete from View1 where field1_id = p_field_id and field2 = p_field2 and field3 = p_field3;

in Instead of DELETE trigger on View1

{{

Delete from tabl1 where field_id = :old.field1_id;

insert into table2(field2, field3) values(:new.field2, :new.field3);

}}

0
 
LVL 7

Expert Comment

by:multithreading
Comment Utility
Is "tabl1" the underlying table for View1?

If so, you have a recurisve trigger.
0
 
LVL 9

Author Comment

by:DrAske
Comment Utility
View1 is a  join for more 3 tables.

thank you for your help :o)
Regards,
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now