| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: TRIGGERS referencing <different user> table
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 3e-mail: jurij.modic_at_mf.sigov.mail.si Ljubljana 1000
![]() |
![]() |