sql - IBM Netezza, How to convert a varchar to a numeric with TO_NUMBER(..., ...) -
i have table called dart_stg1
in netezza database. table has varchar column. trying use below sql convert varchar number, throws error.
code
select distinct to_number(m12,'99g99') dart_stg1 m12 not null;
throws error:
error [hy000] error: bad numeric input format
what error mean?
the error:
error [hy000] error: bad numeric input format
is caused because feeding letters to_number
. feeding 99g99
not number.
the program tries tell it's not number telling numeric input format bad, error says.
Comments
Post a Comment