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

PL\SQL Question.

From: <tim.mcconechy_at_runtime.dk>
Date: Wed, 20 Jan 1999 10:48:37 GMT
Message-ID: <784ca3$tsq$1@nnrp1.dejanews.com>


This hould be easy. i just don't know how to do it. In a stored procedure I want to use the table as a parameter. How do I do it?

Example.
CREATE OR REPLACE PROCEDURE GETNEXTRECNO

	(
		field IN varchar2,
	        table_name IN varchar2,
		nextrecno OUT integer
	)

AS
BEGIN

	/*gets next recno on a table*/
	select max(field) into nextrecno from table_name ;

END; Above errors out on tablename and says. I need to select a table to which the user has access when I compile.

How can I use table as a paraeter like this.

Thanks

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Jan 20 1999 - 04:48:37 CST

Original text of this message

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