I have column in my database table named 'anwers' of type 'character'. Data may be numbers or strings that's why I used column of type 'character'. And I have to calculate the sum of anweres if it is a numeric. But I found that ISNUMERIC will not work for column type of text/character . How can I solve this issue?
Asked
Active
Viewed 3,132 times
0
-
My question is, column type is character but it's not work with isnumeric.But I have to use isnumeric. – Coding world Jun 29 '17 at 10:46
-
[isnumeric() with PostgreSQL](https://stackoverflow.com/a/16206123/1995738) – klin Jun 29 '17 at 10:48
1 Answers
0
In DB2, I've done something like UCASE(answers) = LCASE(answers)
to test if it's numeric. This could work if your column is simple letters/numbers, not including punctuation characters.

Just Rudy
- 700
- 11
- 28