plsql - How to typecast varchar2 to float in oracle -
ntwt float; ntwt:=to_float(substr(text,27,7)); error(38,9): pls-00201: identifier 'to_float' must declared
please help
although there float type in oracle, it's there decoration purposes there's no difference between float , number. in sys.standard float defined as
subtype float number;
therefore, use to_number
function conversion, in:
ntwt := to_number(substr(text, 27, 7));
either or define own to_float function:
create or replace function to_float(s in varchar2) float begin return to_number(s); end to_float;
share , enjoy.
Comments
Post a Comment