Forum Moderators: phranque

Message Too Old, No Replies

Select records

         

stevelibby

8:04 pm on Jan 4, 2005 (gmt 0)

10+ Year Member



Hi Peoples
I am leaning a little about mssql databases. My question is if i have a table of 450 records and i wanted to display those records form 20-40, how would i do this? Bear in mind that the records are not listed by id from 1-450 there are sorted by county.

Thank you in advance.

plumsauce

10:57 am on Jan 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



select top 20 x from county where x not in (select top 20 x from county order by x) order by x

or something similar

stevelibby

11:10 am on Jan 5, 2005 (gmt 0)

10+ Year Member



Thank you i have just tried this i cant seem to get it to work.
What do i replace the x's with?
This is the current string:

SELECT * FROM Customers ORDER BY Cty ASC

Now i wish to change this to select results 20 - 40.