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: PL/SQL Question ...

Re: PL/SQL Question ...

From: Doeni <doeni_at_evhr.net>
Date: Mon, 21 Jun 1999 22:24:16 +0200
Message-ID: <376E9F70.8332971@evhr.net>

Create a synonym in your schema, pointing to the table in the other schema :

CREATE SYNONYM T_KIKA_KNOWNAFIID FOR FC_RTE_A1.T_FIKA_KNOWNAFIID; I don't think you can use a variable, except if you use dynamic SQL (DBMS_SQL package). However, performance will be worse.

narenn_at_my-deja.com wrote:
>
> I am stuck with this for a while. How do you declare
> something like this with the owner being a variable ?
>
> var-name owner.table.column%type;
>
> I wrote a procedure with above datatype. I don;t want to
> hardcode the table owner name in the script. How do i
> make the owner a variable ?
>
> In other words my problem is this. The procedure i need to
> compile access table's which are not owned by the user id
> i use to compile the procedure but has read permission to
> it. The only way i can access the table is like
> this, owner.table_name. eg : FC_RTE_A1.T_FIKA_KNOWNAFIID
> where FC_RTE_A1 is the owner and T_FIKA_KNOWNASFIID is
> the table name. I don;t want to hard code FC_RTE_A1 ie
> owner of the table because the ownership will change
> between various enviroments i need to compile this script
> in!
>
> Any ideas ? I looked through PL/SQL manual from Oracle. I
> could not find any way to do this ?
>
> Please e-mail me at narendra.nathmal_at_fmr.com if you
> have any suggestions.
>
> Thanks
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Mon Jun 21 1999 - 15:24:16 CDT

Original text of this message

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