Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Boolean Function in SQL
pmohanan_at_my-deja.com wrote:
>
> Hi..All,
>
> Is there any function in Oracle which returns 1/TRUE or 0/FALSE
> depending on the condition. I am trying to check whether the value of a
> particluar column is numeric.
>
> When i use to_number(col_name,'99999999') it bombs when it received a
> char_value.
>
> Is there any function like isnumber()? or ischar() in oracle.
>
> The alternative i found was
> substr(col_name,1,1) in ('0','1',.....'9')
>
> Any other alternatives?
>
> Regards,
>
> Praveen
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
select
decode(
replace(
translate(col,'0123456789','@@@@@@@@@@'), '@',null),
or something similar
HTH
-- =========================================== Connor McDonald http://www.oracledba.co.uk We are born naked, wet and hungry...then things get worseReceived on Wed Oct 04 2000 - 06:21:12 CDT
![]() |
![]() |