Having some trouble with data types... In my script, I need the table's data to be ordered by "page", but the values have mixed char/num data (for instance, "21-22"). Because of the hyphen, I have to set it to VARCHAR (or it will erase the hyphen completely), but since it's a number, it won't order properly.
For example, let's say my page numbers are 1, 21-22, 31, 121.
SELECT * FROM 'table' ORDER BY page;
Would return: 1, 121, 21-22, 31 (it's ordering by the first digit in the value only).
Is there a datatype that will allow me to include hypens, but still order properly as numeric data?
Thanks in advance guys!