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 |
Rliss
Starting Member
31 Posts |
Posted - 2007-04-17 : 15:15:48
|
this query selects the top 10 of all rows. Now I am required to toss out the highest, hence, I need to select row 2 - row 11. Any easy to do this without creating another layer?select TOP 10 linkset_name LinkDesc1, start_date_time LinkDesc2, high_pct_occupancy , (trans_isup_oct/trans_bandwidth)*100 Tisup, (trans_sccp_oct/trans_bandwidth)*100 Tsccp, (trans_other_oct/trans_bandwidth)*100 Tother, (recv_isup_oct/recv_bandwidth)*100 Risup, (recv_sccp_oct/recv_bandwidth)*100 Rsccp, (recv_other_oct/recv_bandwidth)*100 RotherFROM [LinkOccupancy].[dbo].[LINKSET_DAILY_HIGH_VIEW]WHERE START_DATE_TEXT = '20061011'ORDER BY HIGH_PCT_OCCUPANCY DESC;Thanks,RLiss |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-17 : 15:28:44
|
http://www.sqlteam.com/item.asp?ItemID=566Or you could get rid of the top one by finding the top 10 after the max by using a where clause with a subquery.Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|