How can I use case or something else to handle errors so my query does not crash. For example I would like to select 1 column and 1 "formula" based on that column... something like this:
select column01 ,
case ('if column01 is number then integer(column01) else 'error'')
from table01
I would basically like the second column to convert column01 into integer, which already works for me fine... but if converting causes an error I would like to see the word 'error'
or at least have the second column say 'OK' when the convertion is possible and 'error' when it is not.
I am using DB2