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: is number

Re: is number

From: Horvath Andras <raas_at_balu.sch.bme.hu>
Date: 14 Sep 2000 07:52:41 GMT
Message-ID: <8pq049$dn8$1@goliat.eik.bme.hu>

eastking_at_my-deja.com wrote:
> I'd like to insert a row whose id is max(to_number(id))+1 into this
> table . In this case , the id should be 3. But to_number('ab') will
> cause a error.How can I achieve it by only a SQL command.

select max(to_number(id)) from table where id>'0' and id<'99';

will work well, provided that the field id is 2 characters long at max.

raas

-- 
 "With enough free time, effort, and an input string that looks like the
  winning entry in last year's obfuscated-C contest, you can turn
  someone's simple mistake into a nationally syndicated news story."
Received on Thu Sep 14 2000 - 02:52:41 CDT

Original text of this message

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