Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select query help

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Is there a way to create a query that will select the the first 100 records that start with the letter S in a field. I built one that has thwe criteria S* that returens all the S's but I only want the first 100. Any suggestions? Thanks!
 
Hi!

Make sure the query is sorted the way you want it to be and use the Top keyword:

Select Top 100 UserName From MyTable Order UserName

As an example

hth
Jeff Bridgham
bridgham@purdue.edu
 
Thanks Jeff, where would I type that, I already have S* under the criteria in design view. Would there be a way to have it select the next 100 like 200 to 300? Thanks!
 
if you have a "counter" column using autonumber,I would suggest that you count the returned result from your first query and then do another query like

select &quot;the info you want&quot; from &quot;table&quot; where counter <= 100

hope this helped
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top