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
Loading
Santhosh Kumar JayaramanPosted Oct 22, 2012, 7:24 AM
sathish kumarPosted Jan 3, 2013, 1:05 AM
select max(top 10 (marks)) from tablename where colum='computer' order by DESC
not tested....
Muhammad younasPosted Oct 22, 2012, 8:04 AM
Anil KumarPosted Oct 22, 2012, 7:18 AM
Sivaraman DhamodaranPosted Oct 22, 2012, 6:54 AM