Click here to Skip to main content
15,848,930 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I have one proble with sql server query.
i am creating the DLL file for the pagination on server side
i am writing this query from this i am getting count of the i want to get the data from table based on the row_number().please look int this query and correct it.

SELECT * FROM (SELECT page.*,PAGE_RANK, ROW_NUMBER() OVER (ORDER BY @@IDENTITY) AS PAGE_RANK FROM (SELECT * FROM (Select * from empcontacts) page ) pagenumber   PAGE_RANK <= 1 AND PAGE_RANK >= 10
,fro this i am getting pagrank syntax


Updated 22-Dec-11 22:57pm

1 solution

Looks like you at least have a problem with PAGE_RANK. It cannot be less than 1 and greater than 10 at the same time.

Here's one good example for paging: SQL Server 2005 Paging Results[^].
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900