I have table called DART_STG1
in Netezza Database. The table has a varchar column. I am trying to use the below SQL to convert the varchar into a number, but it always throws an error.
Code
SELECT DISTINCT TO_NUMBER(M12,'99G99')
FROM DART_STG1
WHERE M12 IS NOT NULL;
Throws an error:
ERROR [HY000] ERROR: Bad numeric input format
What does this error mean?