[dba-SQLServer] sorting problem

Mark Rider ridermark at gmail.com
Fri Oct 29 20:37:34 CDT 2004


On Sat, 30 Oct 2004 00:35:23 +0000, Billy Pang <tuxedo_man at hotmail.com> wrote:
> Hello:
> 
> I have a table that contains one column with the following six values:
> 
> a1
> a2
> a21
> a10x
> a2a
> a10
> 
> Currently if that column is sorted, it is sorted this way:
> 
> a1
> a10
> a10x
> a2
> a21
> a2a
> 
> But I want it to be sorted this way:
> 
> a1
> a2
> a2a
> a10
> a10x
> a21

What are you using to view the sorted column? That will be the best
thing to use to figure out the sort.  Pull the data from the column,
and have the program sort it as you want.If you are looking at the
column in EM then it will sort according to how the database sees it,
and that is the way the text will be sorted.

-- 
Mark Rider
http://commonsensesecurity.info



More information about the dba-SQLServer mailing list