3 edited tags
| link
2 added 5 characters in body; edited tags; edited title
source | link

Is theirthere a collation to sort the following strings in the following order 1,2,3,6,10,10A,10B,11?

I have a database with a varcharVARCHAR column that contains integers of varying length. I want to sort them so 10 comes after 9, not 1, and 70A comes after 70. I was able do this with PATINDEX(), a CTE, and CASE statements in the WHERE clause. 

However, I was wondering if theirthere was a collation where this would be unecessary.

Is their a collation to sort the following strings in the following order 1,2,3,6,10,10A,10B,11

I have a database with a varchar column that contains integers of varying length. I want to sort them so 10 comes after 9, not 1, and 70A comes after 70. I was able do this with PATINDEX(), a CTE and CASE statements in the WHERE clause. However, I was wondering if their was a collation where this would be unecessary.

Is there a collation to sort the following strings in the following order 1,2,3,6,10,10A,10B,11?

I have a database with a VARCHAR column that contains integers of varying length. I want to sort them so 10 comes after 9, not 1, and 70A comes after 70. I was able do this with PATINDEX(), a CTE, and CASE statements in the WHERE clause. 

However, I was wondering if there was a collation where this would be unecessary.

    Tweeted twitter.com/#!/StackDBAs/status/91245285879201792
1
source | link

Is their a collation to sort the following strings in the following order 1,2,3,6,10,10A,10B,11

I have a database with a varchar column that contains integers of varying length. I want to sort them so 10 comes after 9, not 1, and 70A comes after 70. I was able do this with PATINDEX(), a CTE and CASE statements in the WHERE clause. However, I was wondering if their was a collation where this would be unecessary.