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.
| Author |
Topic |
|
moiseszaragoza
Starting Member
8 Posts |
Posted - 2009-08-26 : 11:55:11
|
| I have a simple sort order on a int coloum but it is counting strange. Ej. 1,10,11,12,13,14,15,16,17,18,19,2,20, ... I would like it if it could be1, 2, 3, 4, 5, 6, ... my Query SELECT * FROM TABLE ORDER BY my_Num DESCJust keep smiling |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-08-26 : 12:00:29
|
your my_Num isn't an INT.try ORDER BY convert(int,my_Num) DESC No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
moiseszaragoza
Starting Member
8 Posts |
Posted - 2009-08-28 : 08:58:15
|
| Thanks, that is really helpfullJust keep smiling |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-28 : 09:06:00
|
| http://sqlblogcasts.com/blogs/madhivanan/archive/2008/07/21/ordering-interger-values-stored-in-varchar-column.aspxMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|