A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Limit Rows returned in a query



 
 
Thread Tools Display Modes
  #1  
Old July 7th, 2008, 05:37 PM posted to microsoft.public.access.queries
Nigel
external usenet poster
 
Posts: 29
Default Limit Rows returned in a query

Is there any way to limit the number of rows returned in a query, I have some
conditions but I only want the first 5 rows returned

  #2  
Old July 7th, 2008, 05:50 PM posted to microsoft.public.access.queries
Bob Barrows [MVP]
external usenet poster
 
Posts: 441
Default Limit Rows returned in a query

Nigel wrote:
Is there any way to limit the number of rows returned in a query, I
have some conditions but I only want the first 5 rows returned


Sure, just open the query properties page and set the relevant property. Or,
switch to SQL View and add the words "TOP 5" immediately after the word
"SELECT"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #3  
Old July 7th, 2008, 07:12 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Limit Rows returned in a query

Nigel wrote:

Is there any way to limit the number of rows returned in a query, I have some
conditions but I only want the first 5 rows returned



Check the TOP predicate in Help - Table of contents -
Microsoft Jet SQL Reference

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.