Sorting Problems

knockyo

Well-known member
Joined
Sep 20, 2006
Messages
78
Programming Experience
1-3
Hi,

Can everybody guide me?
My question is: how can i sort/order my numeric with alphabet data into ascending order? By the way im using vb.net to develop an offline application.

Eg: A-01 and A0001
The correct order is
A-01
A0001

TQ
 
Sorry.........edit my question

i found that my MSSQL stored procedure have a statement that using

ORDER BY CAST(right(s.BatchNo,charindex('-',REVERSE(s.BatchNo))-1) AS int) ASC

so, can i order by it like question above?

Eg: A-01, A-001, A00001
A-01
A-001
A00001
 
Back
Top