SQL 2005中的SQL Sever查询 [英] Sql Sever query in SQL 2005

查看:77
本文介绍了SQL 2005中的SQL Sever查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在sql服务器查询中遇到一个问题.
我正在为服务器端的分页创建DLL文件
我正在从中编写此查询,我正在获取Table.now的计数.现在我想基于row_number()从表中获取数据.请查看此查询并进行更正.

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 Table.now 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

,因此我得到了语法错误

问候,

Narasimha

,fro this i am getting pagrank syntax

Regards,

Narasimha

推荐答案

看起来像您至少对PAGE_RANK有问题.不能同时小于1和大于10.

这是一个很好的分页示例: SQL Server 2005分页结果 [
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[^].


这篇关于SQL 2005中的SQL Sever查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆