August 4, 2005 at 1:24 pm
I am trying to order some text with numbers and I can't get it to order correctly. The problem is that when I try to order numbers such as 1.0, 1.1, 1.2, ..., 1.10 it gets ordered as 1.1, 1.10, 1.2, ... I know why this is happening, but I can't think of any way to get around it.
August 4, 2005 at 1:28 pm
One of the simplest ways is to change your data to a consistent format, eg:
1.00, 1.01, 1.02, ..., 1.10
would work.
But if that doesn't suit, you need to write some SQL that will split out the n.m numbers into two integers, n and m, and then ORDER BY those.
August 4, 2005 at 1:47 pm
Thanks for the link noeld. That worked.
August 4, 2005 at 2:52 pm
You are welcome!
* Noel
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply