Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-11-15 : 07:33:25
|
| Eric writes "Assume I have data with one column containing an "outline numbering" value:a.1a.2a.2.1a.3a.10.1A SELECT ordered by this column would return the records with the "a.10.1" record immediately after the "a.1" record. How (and what) do I need to do in order to return the "alphabetic part before the dot" sorted with the "numeric part after the dot", when the field itself is defined as a varchar?This is for SQL Server 2000, SP4, on a Windows 2003 Server/IIS6 platform.Thank you,Eric Kestlerekestler@bigfoot.com" |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2005-11-15 : 08:46:01
|
| Pad these numbers with leading "00000"'s before sorting. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-15 : 08:59:26
|
| How about storing each part in seperate columns and sort by those columns?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|