Selecting Top 10 Values

bwalk037

Registered User.
Local time
Today, 16:41
Joined
Mar 20, 2009
Messages
22
Hello,

I have the following union query, is there away for this query to output only the Top 10 values?


select * from [Highest Impacting AR Reserve Invoices]
UNION select * from [Highest Impacting FM Reserve Invoices];
 
I suspect you'll have to base a second query on this one, and use TOP there. That's based on the assumption that you don't know which of those will produce the top 10.
 
I figured making a separate query would be the easiest way to get the top 10 values but, how do I specify which field I want the query to use to determine the top 10 values?
 
It will pull the top values based on the sorting, so within your second query, specify the field or fields you want the sorting on. Presuming you want the largest values as your top values, you'd sort descending.
 

Users who are viewing this thread

Back
Top Bottom