Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: is number
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
![]() |
![]() |