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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: More than one table for a Triggers

RE: More than one table for a Triggers

From: Mercadante, Thomas F (LABOR) <Thomas.Mercadante_at_labor.state.ny.us>
Date: Wed, 1 Jun 2005 07:43:16 -0400
Message-ID: <ABB9D76E187C5146AB5683F5A07336FF16E669@EXCNYSM0A1AJ.nysemail.nyenet>


Kean,

This requirement begs for a stored package. Rather than inserting directly into a table, create a stored package and call it from your application. It can perform all of the logic required.

Tom

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Kean Jacinta Sent: Wednesday, June 01, 2005 6:37 AM
To: oracle-l_at_freelists.org
Subject: More than one table for a Triggers=20

Hi :)=20

I know that one trigger can be assign to only one table.
I have a situation here, Below are all the tables=20

mapped_table



mappedid --pk=20
comid
empid
passportno

company_table



comid
comname
employee_table

empid
empname
passportno

The mapped_table takes the value from two other table which is company and employee tables.

A trigger name :autoinsert_mapped_tr
This trigger will automatically takes value comid,empid,passportno from both company and employee table into mapped_table on insert and mappedid is a seq number.=20

Since trigger is tied to one table, how can the above scenario be done? I didn't want to create 2 triggers , one for company on insert and another triggers for employee on insert.=20

Thank You
Jkean
=20

=20

        =09

__________________________________=20

Discover Yahoo!=20
Use Yahoo! to plan a weekend, have fun online and more. Check it out!=20 http://discover.yahoo.com/
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 01 2005 - 08:24:06 CDT

Original text of this message

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