LIMIT syntax

  • Thread starter Thread starter Diilb
  • Start date Start date
D

Diilb

I really can't find answer to this question and thought I would post
here for an answer...

I was wondering if there is a LIMIT syntax associated with the SELECT
clause... under Access ?

Thanks for any response.

Diilb
 
What do you want to "limit" -- the number of records pulled? If so the
insert like this --
SELECT TOP 15 xxx xxx xxx

One draw back to this is that if record 15 is equal to more records for the
same criteria then you will get additional records.
 
I really can't find answer to this question and thought I would post
here for an answer...

I was wondering if there is a LIMIT syntax associated with the SELECT
clause... under Access ?

Thanks for any response.

Diilb

Generally the TOP predicate will do this:

SELECT TOP 10 <fields> FROM <table>

will limit retrieval to 10 records.

John W. Vinson[MVP]
 
You can use the MaxRecords property to determine or specify the maximum
number of records that will be returned by:

A query that returns data from an ODBC database in an Microsoft Access
database (.mdb).

A view that returns data from a SQL database in an Access project (.adp).

But it is not SQL - it's ODBC/OLEDB.

TOP implies that there is a sort order, which makes TOP queries much slower
than using the MaxRecords property where it is applicable.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top