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 |
|
SKP
Starting Member
34 Posts |
Posted - 2008-05-22 : 05:40:50
|
| Hi Guys,There is an int filed in my table called "WeekNo" and when I use order by WeekNo Desc, I am getting the following result.9877654321817161515141313121110101This does not seem right, can anyone comment why i am getting this result.Many Thanks |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-05-22 : 05:46:27
|
| Are you sure it is defined as int? or you are not converting it to varchar or char somewhere in your query?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
sandeep.y
Starting Member
1 Post |
Posted - 2008-05-22 : 05:49:40
|
| Check your column type probably it might be varchar or NVarchar, change it to Integer.Then your order by clause will work perfectly.-Sandeep Y. |
 |
|
|
SKP
Starting Member
34 Posts |
Posted - 2008-05-22 : 05:50:09
|
| Hey Harsh,It was my mistake, it has been defined as varchar, not a good day for me today.Thanks for the obvious spotting.How is India in summer? Where from are you in india? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-22 : 05:52:33
|
| I dont think its int field you're ordering by. Can you post your code used? |
 |
|
|
|
|
|