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 -> Re: SQL joins on multiple tables in a trigger

Re: SQL joins on multiple tables in a trigger

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 12 Dec 2005 12:45:51 -0800
Message-ID: <1134420346.997065@jetspin.drizzle.com>


sb wrote:
> Hi,
>
> I am new to oracle and I am facing a dilemma for now. I have 4
> tableslaid out in a following fashion.
>
> Table 1: Primary Key User_ID maps to table 2 's user_id and profile_id
> Table 2: Has 2 primary keys user_id and profile_id
> Table3: Uses table 2's profile id and has an additional column desc
> Table 4:Is triggered by Table 1 (where the trigger is defined) to
> populate duplicate fields in Table 4. Now in Table 4 I have to retrieve
> Profile_ID and Desc from Table 3 via table 2 which has the user_id
> unique to both table 1and table 2. As the trigger exists in table 1and
> profile_id is not present in Table 1, I need a join to gather this
> info.
>
> My questions are:
> Can I create nested triggersto gather info during a trigger from
> various tables?
> What about cursors?Do I need multiple cursors as well?
>
> Any advise will be greatly appreciated.

What do/does the trigger(s) have to do with anything? Please post your Oracle version and the DDL to create the tables and the DML statement you are working with if you want help.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Mon Dec 12 2005 - 14:45:51 CST

Original text of this message

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