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 -> PL/SQL: variable column & table name in select

PL/SQL: variable column & table name in select

From: Viatcheslav V. Kopeikin <kvv_at_main.vsu.ru>
Date: Thu, 11 Jan 2001 10:31:31 +0300
Message-ID: <93jngj$j0o$1@alpha.main.vsu.ru>

Hi, All!
Help me please, I've broken my head on this problem :). The situation is as follows: I need making a procedure on PL/SQL to get the max number of the first column in any table (of course if this column is numeric). How can I say in SELECT "first column in any table"? The procedure looks something alike:
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;

WBR, Viatcheslav. Received on Thu Jan 11 2001 - 01:31:31 CST

Original text of this message

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