A column has a string values like "1/200", "3.5" or "6". How can I convert this String to numeric value in single SQL query?
My actual SQL is more complicated, here is a simple example:
SELECT number_value_in_string FROM table
number_value_in_string's format will be one of:
- ##
- #.##
- #/###
I need to sort by the numeric value of this column. But of course postgres doesn't agree with me that 1/200 is a proper number.