Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Sorting Varchar Data in Numeric manner

Author  Topic 

khushbu11488
Starting Member

9 Posts

Posted - 2012-05-14 : 10:01:15
Hello Friends ...
I have nvarchar Field in My Table.....Having Data Like
1
1/A
2
2000
2/A
3
1000
....

I want Result After Sorting is
1
1/A
2
2/A
3
1000
2000

So How to Do ??????????????
Plz Plz Plz Help Me ..Asap.....

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2012-05-14 : 10:31:40
order by substring(col,1,charindex('/',col+'/')-1)*1

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

khushbu11488
Starting Member

9 Posts

Posted - 2012-05-14 : 13:26:57
thank you so much...:)
Go to Top of Page
   

- Advertisement -