In Cobol one can enquire of an alphanumeric variable whether the content is numeric, viz.:
IF INPUT1 IS NUMERIC
THEN…
I want to be able to do the same in SQL, approximately thus:
SELECT IIF(IsNumeric(column1),Int(column1),0) AS X1…
What is the function I should use?