Re: greatest() a single-row function of sql

From: The Ghost <The_at_Ghost.com>
Date: Thu, 22 Feb 2001 05:13:03 GMT
Message-ID: <zd1l6.211197$KP3.52034983_at_news3.rdc1.on.home.com>


This will also blow up in your face
select greatest('9',a) from dual

                    *

ERROR at line 1:
ORA-00904: invalid column name

I would say the first query works because the numbers are auto converted to char and the second query fails because chars are not autoconverted to numbers.

Just keep comparing apples with apples and oranges with oranges and you will not have a problem.

"xgong" <xgong_at_mediaone.net> wrote in message news:sC_k6.8487$CW1.6387485_at_typhoon.ne.mediaone.net...
> Hi,
> sorry about simple question,
>
> I am fine with following sql:
>
> SQL> select greatest ('X', 88) from dual
> 2 /
>
> G
> -
> X
>
> however, I have problem with following sql:
>
> SQL> select greatest(88, 'X') from dual
> 2 /
> select greatest(88, 'X') from dual
> *
> ERROR at line 1:
> ORA-01722: invalid number
>
> what is problem with 2nd one ?
>
> thank you in adavnce!
> xgong
>
>
Received on Thu Feb 22 2001 - 06:13:03 CET

Original text of this message