Re: pl/sql greatest function

From: John Morgan <John_Morgan_at_OIT.PEACHNET.EDU>
Date: 1996/05/24
Message-ID: <John_Morgan-2405961108380001_at_jmorgan.aas.peachnet.edu>#1/1


dbms_output.Put_line requires a char argument... greatest returns a value of type expression 1, which in this case is numeric...
so, change your expressions to:
dbms_output.put_line(to_char(greatest(1,2)));

later

In article <31A505DC.3A4D_at_wizard.colorado.edu>, carl sorenson <sorenson_c_at_wizard.colorado.edu> wrote:

> howdy,
>
> pl/sql is behaving as if there is not a function called
> 'greatest'.
>
> if you see my problem, please respond by email and a post,
> thanks :)
>
> carl sorenson
> university of colorado
>
>
> Connected to:
> Oracle7 Server Release 7.1.6.2.0 - Production Release
> With the distributed and parallel query options
> PL/SQL Release 2.1.6.2.0 - Production
>
> SQL> set serveroutput on size 2000
> SQL> begin
> 2 dbms_output.put_line(greatest(1,2));
> 3 end;
> 4 /
> begin
> *
> ERROR at line 1:
> ORA-06550: line 2, column 24:
> PLS-00201: identifier 'GREATEST' must be declared
> ORA-06550: line 2, column 3:
> PL/SQL: Statement ignored
>
>
> if i do 'dbms_output.put_line(1)' it works fine (prints a '1') -
>
>
> SQL> list
> 1 begin
> 2 dbms_output.put_line(1);
> 3* end;
> SQL> /
> 1
>
> PL/SQL procedure successfully completed.
  Received on Fri May 24 1996 - 00:00:00 CEST

Original text of this message