retrieving only 10 rows

  • Thread starter Thread starter Joao
  • Start date Start date
J

Joao

How can you retrieve the latest 10 records of, for example, 5670 records
within a database?

Where rowcount<10 ?? Oracle isn't it?

Thanks in advance.
 
Joao said:
How can you retrieve the latest 10 records of, for example, 5670
records within a database?

Where rowcount<10 ?? Oracle isn't it?

Thanks in advance.

SELECT TOP 10 *
FROM TableName
ORDER BY SomeDateField DESC

In the graphical query designer you need to open the properties box and look
for the property named "Top Values". Note that Access will include any
"ties" on the tenth value so you will need to include as many fields as
necessary in your sort order to break those ties if you always want exactly
10 rows returned.
 
If you have an autonumber record ID then sort descending by that
number. - Assuming that that number is defined in the typical
autonumber style.

Ron
 
Back
Top