i m using sql server 2005
i want to get top 10 maximum records from a table. i m using query
select top(10) marks from tbl where testname='computer' order by desc
it gives result as
80
77
50
4
30
2
20
1
1
1
it sort them only by first character not by all characters
4 is greator than 3 but 4 is not greator thn 30,
how it can be solved
Select maximum value
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Oct 22, 2012, 3:24 AM EDT
Sivaraman DhamodaranRank #40 · 34.5K reputationPosted Oct 22, 2012, 2:54 AM EDT
Anil KumarRank #367 · 6.8K reputationPosted Oct 22, 2012, 3:18 AM EDT
Muhammad younas164 reputationPosted Oct 22, 2012, 4:04 AM EDT
sathish kumar115 reputationPosted Jan 2, 2013, 8:05 PM EST
select max(top 10 (marks)) from tablename where colum='computer' order by DESC
not tested....