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 2000 Forums
 SQL Server Development (2000)
 varchar datatype that I need to sort in Numeric order

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-12-20 : 07:47:27
Michael writes "I have a varchar datatype that I need to sort in Numeric order.

classroom1
1
stansroom2
michaelsclass13
4

I want it to sort as...

1
classroom1
stansroom2
4
michaelsclass13"

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-20 : 08:23:39
See this topic http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76592
Are you taking same class as the poster in the link above?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-20 : 08:30:00
Refer this http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76592


Madhivanan

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

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-20 : 08:31:05
Peso, you posted that when I was searching for that thread


Madhivanan

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

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-20 : 08:37:30
Yes. I can be naughty sometimes.

I had it already in my cache... , or at least among the 10 last posts on my profile page.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2006-12-20 : 14:11:31
Madhi,

That's how his post count goes up so fast... He cheats!

Ken
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-21 : 02:03:31
quote:
Originally posted by KenW

Madhi,

That's how his post count goes up so fast... He cheats!

Ken

Yes

Madhivanan

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

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-21 : 02:31:36
Speaking of that... I can't find a topic some weeks ago where I was involved in adding trailing "st", "nd", "rd", th".
It was for all number, not just 1-20, but 1-1000.
I remember x20, x21 and x22 were special cases.

Does anyone remember this topic?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-21 : 07:47:29
Did you remember the suggestion you have given?
Suppose you started with reply "Try this also"

Then Do google search on "Try this also"+sqlteam+peso

Madhivanan

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

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-21 : 08:09:47
Thanks! I tried with no luck.
I remember we were a few helping out on that topic. I also remember there were a special case for 120, 121 and 122 not following same rule as 20, 21 and 22.

Strange. Can't finfd it at all. Probably using wrong keywords when searching.



Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -