Using the Small Function from Excel in Access 2002

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database where i need to write a simple query to display the 1st 2nd
and 3rd smallest numbers (currency format) from an array of data that sits in
each row of my database. In excel I would normally use the Small function. In
Access there is nothing I can see that is available.

I am an Access beginner and keen to learn.
 
It sounds counterintuitive, but the TOP predicate (not a function) will
return records that fall at the top OR bottom of a range, depending on
how you sort the data in the ORDER BY clause. Something like:

SELECT TOP 3
[Field1],[Field2], &c
FROM [YourTable]
WHERE <Criteria>
ORDER BY [CurrencyField] ASC;

Using the ASC (for "Ascending") predicate specifies a return of bottom
values.

hth,

LeAnne
 
Back
Top