This particular function that checks if a string is a number is throwing an exception when i pass in 1.00 :
create or replace function my_to_number( p_num in
varchar2 ) return number
as
x number;
num_val_error exception;
pragma exception_init( num_val_error, -6502 );
begin
x := to_number( p_num );
return 1;
exception
when num_val_error then
return 0;
end my_to_number;
1.00 is a perfectly valid number. Right?
TO_NUMBERtakes up to three parameters, the first is the expression to convert, the second is the number format to use, and the third defines what the decimal and group separators are. Only the first is required. Without the third nlsparam element, Oracle uses the default for your session. It looks like the default decimal separator for your locale is ‘,’.Try
TO_NUMBER(p_num, '9G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,''')