PL/SQL passing tablename as parameter

From: Mohammed Ghouse <mghous1_at_mason1.gmu.edu>
Date: 26 Nov 1994 17:01:02 GMT
Message-ID: <3b7pke$q5e_at_portal.gmu.edu>


In a package, I m trying to write a procedure as given below:

PROCEDURE proc_x(table_name CHAR) AS
  CURSOR curs_x IS

     SELECT * from table_name;
BEGIN
--- use the cursor
END I want to call the above procedure from another procedure as

PROCEDURE proc_y AS
BEGIN
 proc_x(t09) -- where t09 is an existing table_name END This kind of thing is possible if I use PRO*C with Dynamic method 3 or 4.
But, I am not able to do this by using pure PL/SQL and package structure.

I tried DECODE; but, it works only in SELECT clause NOT IN FROM CALUSE. Anybody has a work around to this problem: If possible, email me your response.
Thanks Received on Sat Nov 26 1994 - 18:01:02 CET

Original text of this message