I want to check type of value in postgres like this:
SELECT id,
CASE
WHEN val_is_integer THEN (SOME_QUERY)
WHEN val_isnot_integer THEN (ANOTHER_QUERY)
ELSE 0
END
FROM test;
How to do that?
notes: the value is varchar type in table, and in that field there is value is numeric and varchar ...
example:
ID | value
1 | test
2 | 10
3 | 12
4 | test123