Re: Passing a table name as a parameter within a stored procedure.

From: Oliver Critchley <oliver.critchley_at_no.spam.please>
Date: 1997/12/09
Message-ID: <348D380B.777_at_no.spam.please>#1/1


Adrian Shepherd wrote:
>
> Try as I might, I cannot pass a table name as a parameter/argument to a
> stored procedure and then refer to this table within the stored procedure..
>
> e.g.
>
> SQL> exec MYPROC (EMP)
>
> Whereby in my SP I need to select the number of rows from EMP...
>
> Any ideas ?

You'll need to use dynamic SQL. Have a look at "Using DDL and Dynamic SQL" in Chapter 5 of the "Pl/SQL User's Guide and Reference".

Oliver. Received on Tue Dec 09 1997 - 00:00:00 CET

Original text of this message