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!

Filter Query to another table

Status
Not open for further replies.

ali32j

Technical User
Joined
Apr 23, 2007
Messages
97
Location
GB
Hi ALl

I am using the following SQL in a query, which filters to user, but seems it looks at the bottom 25 of the whole table not the filtered table


SELECT BusinessWarehouseMonth.[Ship To], BusinessWarehouseMonth.Territory, BusinessWarehouseMonth.Delta, BusinessWarehouseMonth.[Period Yr-1], BusinessWarehouseMonth.[Period T/O], BusinessWarehouseMonth.[FY-1 Full Year], BusinessWarehouseMonth.[FY-2 Full Year]
FROM BusinessWarehouseMonth
WHERE (((BusinessWarehouseMonth.Delta) In (select top 25 delta
from businesswarehousemonth
order by delta asc)))
ORDER BY BusinessWarehouseMonth.Delta;

Is there anyway to show the bottom 25 of the filtered records?

Ali
 
Does this work?
Code:
SELECT BusinessWarehouseMonth.[Ship To], BusinessWarehouseMonth.Territory, BusinessWarehouseMonth.Delta, BusinessWarehouseMonth.[Period Yr-1], BusinessWarehouseMonth.[Period T/O], BusinessWarehouseMonth.[FY-1 Full Year], BusinessWarehouseMonth.[FY-2 Full Year]
FROM BusinessWarehouseMonth
WHERE (((BusinessWarehouseMonth.Delta) In (select top 25 delta
       from businesswarehousemonth
order by delta DESC)))
ORDER BY BusinessWarehouseMonth.Delta;

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top