MS Access and LIMIT Clause

Posted on 2003-03-12
Medium Priority
Last Modified: 2012-06-27

I'm wondering if the "LIMIT" clause works with MS Access.

I'm accessing a DB from a PHP page and I have to make a search with some
limits.  I tried "SELECT * FROM table LIMIT 0, 10;" in the build-in SQL
query in MS Access but it says "Syntaxe error in FROM clause".

Can anyone help me in this one please ?

Thanks in advance !!

Question by:DarkAngel88
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 34

Accepted Solution

arbert earned 40 total points
ID: 8121851
Nope, about as good as it gets is "Select top 10 from table"


Author Comment

ID: 8121882
But what about if I want to select between the 30th and 40th entry ??
LVL 34

Expert Comment

ID: 8122540
You would have to do that based upon a unique key on the table and selecting the records based upon the max value from the last key selected.....

Expert Comment

ID: 8122903
Its not pretty or fast or very flexible but this syntax will would get you entries 30-40 from a table where recordid is a unique or primary key in MS Access :

select * from (select top 10 * from (select top 40 * from table order by recordid asc) order by recordid desc) recordid order by recordid asc

If recordid is not unique or you have a complex sort, expanding on this gets pretty hairy.

best regards,

Dave Kawliche
LVL 34

Expert Comment

ID: 8558865
Did you ever figure this out?  You going to close the question?


Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question