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!

Prob with SQL where statement

Status
Not open for further replies.

lizray

Programmer
May 14, 2008
126
AU
I have a recordset with one of the fields, "nbr" containing numbers that increase in value, but are not contiguous. I want to select records based on this field, and specifying the starting value and the next 10 records. If for example I wanted to get records starting with nbr=14, the where condition could be "between 14 and ???? How do I specify the upper limit. I would really appreciate some help !
 
[tt]
Select TOP 10 ..., ...
FROM SomeTable
WHERE nbr >= 14
[/tt]

Have fun.

---- Andy
 
SELECT TOP 10 ... WHERE nbr>=14 ORDER BY nbr

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for that. My experience in this area is limited and I appreciated your help. It solved the prob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top