I currently have a query that does a distinct, so I can order the values on the screen.
select distinct CONVERT(real, RTRIM(REPLACE(Height, 'mm', ''))), Height from TEST_DATA where series = 'ABC' ORDER BY CONVERT(real, RTRIM(REPLACE(Height, 'mm', ''))) ASC
It works fine, but problem now... I don't have all numeric values in the 'xxmm' format in my Height records.
Now I have 2 records with 'Edge' in the record. So, I need to find a new way to order the above query with these new records.
This should return records with Height='Edge' as the 1st record, then sort asc.
Open in new window