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 |
|
solisjojo
Starting Member
4 Posts |
Posted - 2005-05-24 : 04:37:42
|
| Hi Everyone,let say in a table i have million records and i want to get the last 10 highest value, i want the results to be in ASC order, How would i get it? please helpsaple data:Table name : tb1Col name : Col1COL1:1578910131618192334354550I want the result to be like this:Outputcol1:10131618192334354550Please helpThanks!jojo Solis |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-05-24 : 04:53:00
|
| Select col1 from (select top 10 col1 from tb1 order by col1 desc) T order by col1 AscMadhivananFailing to plan is Planning to fail |
 |
|
|
solisjojo
Starting Member
4 Posts |
Posted - 2005-05-24 : 05:12:02
|
| WOW!it works perfectly!thanks a lot! |
 |
|
|
|
|
|