I want to display page number in ascending order. But, since the field PAGE is of String datatype, normal 'ORDER BY' considers 10 < 2. I have to make the field PAGE as String because there can be inputs like '3-4'. Can anyone please suggest a way out. I've attached screenshot for reference.
where F_NL = '29'
order by page asc;
select page from p order by to_number(nvl(substr(page, 1, instr(page, '-')-1), page))