Rx_
Nothing In Moderation
- Local time
- Yesterday, 22:40
- Joined
- Oct 22, 2009
- Messages
- 2,803
What is the most efficient way to sort text numbers into numeric sort order? An example is attached.
Two columns - WName and WNumber.
These are formal name assignments set by a regulatulated agency. So we have 1, 11, 111 (these can not be 001).
See attachment, note how Wnumber sorts. The 9 comes after 71. If there was a 666, it would sort between 3 ad 67 in this example.
This is an Access DB, but the linked table will soon be on SQL 2008.
A contrived field of My WNumSort: Cint([WNumber])
could be created with the sort assending assigned to it.
Would that be the most efficient way to control this sort?
For the SQL Server - this could become a view so the sorting takes place on SQL Server.
Two columns - WName and WNumber.
These are formal name assignments set by a regulatulated agency. So we have 1, 11, 111 (these can not be 001).
See attachment, note how Wnumber sorts. The 9 comes after 71. If there was a 666, it would sort between 3 ad 67 in this example.
This is an Access DB, but the linked table will soon be on SQL 2008.
A contrived field of My WNumSort: Cint([WNumber])
could be created with the sort assending assigned to it.
Would that be the most efficient way to control this sort?
For the SQL Server - this could become a view so the sorting takes place on SQL Server.