Monday, March 12, 2012

Query Paging

let's suppose that we have a table entitled "tab1" which has more than 1000 rows and about 10 columns

so in SQL 2000, if I do this query:

SELECT * FROM tab1

the result will be displaying all the rows from the begining.

and my teacher told me that there's a new option in SQL 2005 which is you can display the result of the query in a page mode.

so can anyone tell me how can I do so for this query:

SELECT * FROM tab1

so that I can see the results in pages.

thanks

This is probably related to T-SQL.|||

I guess you mean the RANK option where you can number the result set to use paging, more information about that can be found in the BOL.

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||? Some information on my blog here: http://sqljunkies.com/WebLog/amachanic/archive/2004/11/03/4945.aspx Let me know if you have any questions. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Uncle Sam@.discussions.microsoft.com> wrote in message news:3653b2ba-3ba6-4cca-a4f7-14ce53222af2@.discussions.microsoft.com... let's suppose that we have a table entitled "tab1" which has more than 1000 rows and about 10 columns so in SQL 2000, if I do this query: SELECT * FROM tab1 the result will be displaying all the rows from the begining. and my teacher told me that there's a new option in SQL 2005 which is you can display the result of the query in a page mode. so can anyone tell me how can I do so for this query: SELECT * FROM tab1 so that I can see the results in pages. thanks|||

sorry, it is not what I need,

my question is simple. I don't want to write any procedures or something else, I just want to see the result of "SELECT * FROM tab1" in a grid or text with pages.

Just like any word program, so I can click on next to go to the next page or something like that.

My teacher told me that it is a new feature in SQL 2005 and I have searched for it and still not found it.

thanks

|||Hi,

I guess you don′t mean then the new functionality of SQL Server rather than the one from ASP.NET 2.0 and the new datalistcontrol:

http://weblogs.asp.net/scottgu/archive/2006/01/07/434787.aspx

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

no man its not what I want, what I want is a new service or a procedure tha makes the results of queries appear in pages.

I am sure that It exists but please I want some information about it, It's urgent.

Thanks

No comments:

Post a Comment