Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return bottom 20 results

Status
Not open for further replies.

ali32j

Technical User
Joined
Apr 23, 2007
Messages
97
Location
GB
hi all

I m using the following code to return the top 20 results in my query, but i need to run another query using the same records but returning the bottom 20 results

SELECT BusinessWarehouse.[Ship To], BusinessWarehouse.Territory, BusinessWarehouse.Delta, BusinessWarehouse.[Period Yr-1], BusinessWarehouse.[Period T/O], BusinessWarehouse.[FY-1 Full Year], BusinessWarehouse.[FY-2 Full Year]
FROM BusinessWarehouse
WHERE (((BusinessWarehouse.Delta) In (select BOTTOM 20 delta
from businesswarehouse
order by delta desc)))
ORDER BY BusinessWarehouse.Delta DESC;

Can anyone shed any light have searched but not managed to locate any similar questions

Ali
 
sorry just answered my own question, change order by delta asc))) to order by delta desc)))

seems to work perfect


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top