This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Sort problem in Access and SQL ServerI just find out this:
"-"(hyphen) is ignored in Access or SQL Server when I try to order a field.
For example:3 records,A-A,AB,A-C
I expect a sort result like AB,A-A,A-C.but it gives a result A-A,AB,A-C.
I looked up Microsoft's website.It's DESIGNED.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q236952
Who can tell a east way to fix this problem?
Thanks a lot!
-goodbaby(小宝);
2002-8-27
{393}
(#715913@0)
-
Someting to try in SQL ServerSELECT
SomeField
FROM
SomeTable
ORDER BY
REPLACE(SortField,'-','!');
Based on your data, you can choose a more properate character to replace hyphens in the fields for sorting.
-red7male(洪七公);
2002-8-27
{197}
(#715940@0)
-
thank you very much!
-goodbaby(小宝);
2002-8-27
(#715955@0)