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: TRIGGERS referencing <different user> table

Re: TRIGGERS referencing <different user> table

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1997/06/06
Message-ID: <3398560d.4091001@www.sigov.si>#1/1

On Fri, 06 Jun 1997 10:16:14 +0200, Radek Hulan <ivan2000_at_technologist.com> wrote:

>Could anyone help me about HOW to reference a different user table
>in BEFORE INSERT trigger? I want to fill in some :new fields which
>were created under USER_A with values from tables created under
>USER_B (by using simple select statement).
>
>If I try something like SELECT xxx INTO :new.yyy FROM USER_B.TABLE
>WHERE ... (on USER_A.this_trigger), it doesnt work. I tried also
>using synonyms, but with no luck.
>
>Thanks in advance.
>
>Radek Hulan
>e-mail: ivan2000_at_technologist.com
>Konojedska 33, Prague, Czech Republic

I think it is nothing wrong with the way you reference object in another schema (i.e. SCHEMA.OBJECT_NAME or valid synonym).

Check if USER_A (the owner of a trigger) has been given explicit SELECT permision on USER_B.TABLE. It won't work if his permision was assigned via role!

Regards,


Jurij Modic                             Republic of Slovenia
tel: +386 61 178 55 14                  Ministry of Finance
fax: +386 61  21 45 84                  Zupanciceva 3
e-mail: jurij.modic_at_mf.sigov.mail.si Ljubljana 1000
Received on Fri Jun 06 1997 - 00:00:00 CDT

Original text of this message

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