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

Home -> Community -> Usenet -> c.d.o.misc -> Re: giving tablenames to functions or procedures

Re: giving tablenames to functions or procedures

From: Anatoly V. Lisovoy <anatoly_at_ftc.ru>
Date: 1998/04/10
Message-ID: <6gjvno$khs$1@david.ftc.ru>#1/1

Michael Brohl wrote <6gftht$pbt$1_at_news00.btx.dtag.de> ...
>Is there any way to give tablenames to functions or
>procedures and how can I refer to them?
>
>e.g.
>
> create function Test
> (cTabName CHAR)
> RETURN CHAR IS
> .
> .
> BEGIN
> .
> .
> SELECT Testfield FROM cTabName;
> .
> .
> END;
> /
>
>This example doesn't work, because the compiler didn't know
>if the specified table is accessable at runtime.

That's right!
any "select" staitment in Oracle's PL/SQL procedure/function is "static SQL".
What U need - Dynamic SQL. See DBMS_SQL package specification.

Anatoly/ Received on Fri Apr 10 1998 - 00:00:00 CDT

Original text of this message

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