Hi all,
what is the translation for the sqlserver function ISNUMERIC
in Oracle.
Thanks
Printable View
Hi all,
what is the translation for the sqlserver function ISNUMERIC
in Oracle.
Thanks
Hi,
I think there isn't anything similar.
But if you need it you can write it yourself, a simple example could be:Code:create or replace function isnumeric (param in char) return boolean as
dummy varchar2(100);
begin
dummy:=to_char(to_number(param));
return(true);
exception
when others then
return (false);
end;
/
I don't see any reason for using TO_CHAR(TO_NUMBER()) when a single TO_NUMBER would do:
Code:create or replace function isnumeric (param in varchar2) return boolean as
dummy number;
begin
dummy:=to_number(param);
return(true);
exception
when others then
return (false);
end;
/
Yes, that's pure truth.
I cut it from another piece of code and made some adjustments and I overlooked that.
Sorry for that and hope I didn't confuse anybody.
Thanks Jurij for correction.
Ales