Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlserver 2008 分页问题 #20

Closed
alasai opened this issue Aug 30, 2019 · 1 comment
Closed

sqlserver 2008 分页问题 #20

alasai opened this issue Aug 30, 2019 · 1 comment

Comments

@alasai
Copy link
Contributor

alasai commented Aug 30, 2019

根据你的指示,修改了SqlServerAdapter.cs里面的代码
sql = string.Format("select * from (select row_number() over(order by {0}) as Rownum,{1} from {2} where {3}) as T where T.Rownum between {4} and {5}", sort, select, table, where, skip, take);

运行查询分页就会报错,
order by id 字段不明确
比如生成代码如下
图片
这个是程序字段生成的,我怎么控制呢

@iamoldli
Copy link
Owner

我已经添加了2008版本的支持,你更下代码试下吧
更新日志:https://nm.iamoldli.com/docs/update/2019-08-30.html

@alasai alasai closed this as completed Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants