Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 retrieving records

Author  Topic 

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2007-01-11 : 13:34:51
Gurus
i have 20 records in a table, i want to get rows from 11-15.
How will i do this?
Regards
Nitin

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-01-11 : 13:39:21
See http://davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-01-11 : 13:39:23
In 2005, you use the new ROW_NUMBER function.

Just check out the numerous results from Google:
http://www.google.com/search?hl=en&lr=&q=sql+server+2005+paging+row_number&btnG=Search

Tara Kizer
Go to Top of Page

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2007-01-11 : 14:47:46
Thanks
And what will be the function for 2000?
Regards
Nitin
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-01-11 : 14:54:55
Advice: if you are not using SQL Server 2005, don't post questions in the SQL Server 2005 forum.

- Jeff
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-01-11 : 15:10:27
http://www.google.com/search?hl=en&lr=&q=sql+server+2000+paging&btnG=Search

The solution that we use involves a temp table, but there are many solutions. So check out what Google returns and see what fits your needs. Also check out Jeff's paging in 2000 article.

Tara Kizer
Go to Top of Page
   

- Advertisement -