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

Home -> Community -> Usenet -> c.d.o.server -> Re: Getting the max of a char field

Re: Getting the max of a char field

From: Sylvain Leclerc <SLeclerc_at_magrit.com>
Date: Fri, 26 Nov 1999 14:03:12 -0500
Message-ID: <044CD796C702D111B56800608CCC51D011DD2A@INT_04>


First the function name is TO_NUMBER.
Second, your column_name must have at least one value somewhere that is not a number but a true char.
Try with where col between '0' and '9'.

Sylvain Leclerc, DBA
sleclerc_at_magrit.com

> -----Original Message-----
> From: nospam#####franz.mueller_at_orbis.de (Franz Mueller)
> [SMTP:nospam#####franz.mueller_at_orbis.de]
> Posted At: Friday, November 26, 1999 3:54 AM
> Posted To: server
> Conversation: Getting the max of a char field
> Subject: Getting the max of a char field
>
> Hi,
>
> I have a table T1 and column c1 that is a char, but contains integers.
> What I want, is to get the max of these values:
> "select to_num(c1) from T1" gives me the integer values
> "select max(to_num(c1)) from T1" or even "select max(NUM) from (select
> to_num(c1) NUM from T1)" gives me an error:
> "ORA-01722: invalid number"
>
> Has anybody any idea how to get this max?
> Thanks
Received on Fri Nov 26 1999 - 13:03:12 CST

Original text of this message

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