select constant ,description from action order by description
--Here description is a varchar datatype. And collation for database is
SQL_LAtin1_General_CP1_CI_AS.
My question is what order the sorting happens.It's not ASCII value because
numbers come before _ in ASCII.
Thanks
constant description
-- --
6 *uuu
7 :ooo
2 _addd
3 0111
4 3000
8 AAA
1 add
5 T000Abraham,
Perhaps this helps:
If you do not specify a binary collation, SQL Server uses the dictionary
ordering of the collation you have chosen. Dictionary order means characters
are not sorted or compared based only on their bit patterns. The collation
follows the conventions of the associated language regarding the proper
sequence for characters. For example, case-insensitive sort orders must use
dictionary rules to determine which lowercase and uppercase bit patterns are
equal.
Russell Fields
"Abraham" <binu_ca@.yahoo.com> wrote in message
news:eRLcMFO7DHA.4060@.tk2msftngp13.phx.gbl...
> select constant ,description from action order by description
> --Here description is a varchar datatype. And collation for database is
> SQL_LAtin1_General_CP1_CI_AS.
> My question is what order the sorting happens.It's not ASCII value because
> numbers come before _ in ASCII.
> Thanks
> constant description
> -- --
> 6 *uuu
> 7 :ooo
> 2 _addd
> 3 0111
> 4 3000
> 8 AAA
> 1 add
> 5 T000
>sql
No comments:
Post a Comment