Robert L. Stewart
rl_stewart at highstream.net
Mon Nov 1 13:08:21 CST 2004
Billy, With the rules changing and such, one of the ways of doing this might be to break out the unique values, if there are not too many of them, into their own table and define the sort order there. Give the end user a form to maintain the sort order and then they can apply all the rules they want to at the table level as they change the sort order themselves. :-) Robert At 12:03 PM 11/1/2004 -0600, you wrote: > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf > > Of Billy Pang > > Sent: Friday, October 29, 2004 8:35 PM > > To: dba-SQLServer at databaseadvisors.com > > Subject: [dba-SQLServer] sorting problem > > > > > > 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 > > > > (note: a2a comes before a10, a21 goes after a10x, etc...ergo, > > letters come > > before numbers, contrary to their ascii values) > > > > Is it possible or is it a pipe dream? Below is copy of code. > > > > Thanks in advance, > > Billy > >