how to select any last record in the querry

  • Thread starter Thread starter Naveed Pathan
  • Start date Start date
N

Naveed Pathan

hi friends i would like to know that how it is possible to select the last
ten records related to a particular suppliers.

supose a supplier supply me the goods and his name is john and i would like
to run a querry to retrieve his last ten records;
though i can do it with with help of in( ) function but that take time .
thankx
 
However you define 'last' (date field?) sort by that field Descending, and
add the criteria to limit it to the particular supplier ('John'.) Then set
the query's Top property to
10
in the Properties box.

If you are trying to get the top 10 for all suppliers in the one query, use
a subquery. That will be slow: perhaps that's what you meant by the IN ().
If you need more help with this approach, see:
http://allenbrowne.com/subquery-01.html#TopN
 
that's ok but dear i want the last ten records doesn't matter what are they
but i need the last ten records; not the top ten records
 
Why not answer Allen's question? Assume all of your record information is
recorded on marbles and thrown into a bag and mixed. You need to tell us how
you would be able to determine which of the marbles for a supplier were the
"last". If you can't identify the "last" from the information recorded on
the marbles then you won't be able to query the "last".

Please provide your table and field names as well as how you would define
"last".

Duane Hookom
MS Access MVP
 
lets presume the date


Duane Hookom said:
Why not answer Allen's question? Assume all of your record information is
recorded on marbles and thrown into a bag and mixed. You need to tell us how
you would be able to determine which of the marbles for a supplier were the
"last". If you can't identify the "last" from the information recorded on
the marbles then you won't be able to query the "last".

Please provide your table and field names as well as how you would define
"last".

Duane Hookom
MS Access MVP
 
You have been helped here enough that you should understand how to read and
reply. Again,
<quote>Please provide your table and field names as well as how you would
define
"last".</quote>

Duane Hookom
MS Access MVP
 
Back
Top