select * from example Order By Case When IsNumeric(id) = 1 Then Right('0000000000000000000' + id, 20) Else id End
Thanks&Regards LakshmiNarayana Nalluri.
Select EmpID from TableName Order by CheckSum(EmpID)
Cheers www.SQLServerbuddy.blogspot.com iLink Multitech Solutions
Mark as Answer if its helpful to you Kumaraspcode2009@gmail.com
Login to post response