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!

get next N records

Status
Not open for further replies.

JohnSouth

Programmer
Feb 20, 2001
4
0
0
GB
Hi
I'm sure this is an old perennial, so feel free to refer me to earlier answers..
How so I get SQL to return me the next/previous N records from a table that does not have a suitable unique key I can use to fix the start point?

I can get the first N with SELECT TOP, but after that it gets difficult.

JohnSouth
Pangbourne UK


John South
JS Associates
Pangbourne UK
 
I haven't figured out how to use the thread identifier, but if you go to the keyword search tab and enter

"How to return a range of records " there is a good discussion and with code how to do it.
 
The thread that forecasting referred to is thread183-56272. To post a thread number in a message, go to the upper left corner of the thread, copy the thread number including the word "thread" and paste it in the message box as I did in this message.

For more info on paging in SQL Server, check the following links.

Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top