Click here to Skip to main content
15,311,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Dear Friends,

I have a problem in the sorting of data coming from SQL Server 2008 R2 when the data is in this format:-

1). Female BC-1 Casting
2). Female BC-1 Pin Bush
3). Female BC-10 Casting
4). Female BC-10 Pin Bush Coupling

Like in the data above listed the listing should be in the order:-

1). Female BC-1 Casting
2). Female BC-10 Casting
3). Female BC-1 Pin Bush
4). Female BC-10 Pin Bush Coupling

What i have examined here that the string is in alphanumeric format so the order by clause is not able to sort it. But how to solve an alphanumeric string. Can any one suggest any solution for the same?

Thanks
Posted
Updated 3-Jan-12 1:23am
v2
Comments
Om Prakash Pant 2-Jan-12 0:43am
   
does your data contain "Female BC-" for all records?

1 solution

split and sort the incoming data.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900