Is there a way to easily sort in SQL Server 2005 while ignoring hyphens in a string field? Currently I have to do a REPLACE(fieldname,'-','') or a function to remove the hyphen in the sort clause. I was hoping there was a flag I could set at the top of the stored procedure or something.
Access and the GridView default sorting seems to ignore the hypen in strings.
I learned something new, just like you as well
I believe the difference is between a "String Sort" vs a "Word Sort" (ignores hyphen)
Sample difference between WORD sort and STRING sort http://andrusdevelopment.blogspot.com/2007/10/string-sort-vs-word-sort-in-net.html
From Microsoft http://support.microsoft.com/kb/322112
I did some sample code you can also play with the COLLATE to find the one to work with your sorting