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

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL: variable column & table name in select

Re: PL/SQL: variable column & table name in select

From: Cristian Veronesi <nospam_at_me.please>
Date: Thu, 11 Jan 2001 10:17:28 +0100
Message-ID: <3A5D7A28.D7ADA7D6@me.please>

"Viatcheslav V. Kopeikin" wrote:

> procedure max number (table name varchar2,
> maxnum number) is
> begin
> select max([What here?]) into maxnum from [What here?];
> dbms output.enable;
> dbms output.put line('maxnum='||to char(maxnum));
> end max number;

I think there's no way to do it using embedded SQL. Use dynamic SQL instead.

Regards, Cristian

-- 

Cristian Veronesi ><(((( > http://www.crpa.it

General rule for life: avoid pain for as long as possible
unless doing so will ultimately cause more pain.
Received on Thu Jan 11 2001 - 03:17:28 CST

Original text of this message

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