主题:sql2000分页问题

zhoyg 2019年10月02日 25

我的数据库是sql2000,分页语句是

pageall 

===*分页查询所有用户

 select@pageTag(){ 

a.*,b.role_name,c.org_name 

@} 

from members a left join role b on a.roles = b.role_id left join orgs c on a.org_id = c.org_id 


在后台生成的分页语句是

┏━━━━━ Debug [users.pageall_page] ━━━┣

 SQL: with query as ( select inner_query.*, row_number() over (order by current_timestamp) as beetl_rn from ( select top(?) a.*,b.role_name,c.org_name from members a left join role b on a.roles = b.role_id left join orgs c on a.org_id = c.org_id where 1=1 and (a.org_id =? or a.org_id in (select org_id from orgs where parent_org = ?)) ) inner_query ) select * from query where beetl_rn between ? and ?┣

 参数: [10, 002, 002, 1, 10]┣ 位置: com.post.service.impl.UsersServiceImpl.pageall(UsersServiceImpl.java:60)┗━━━━━ Debug [ ERROR:在关键字 'with' 附近有语法错误。] ━━━org.beetl.sql.core.BeetlSQLException: java.sql.SQLException: 在关键字 'with' 附近有语法错误。

在配置文件中已配置了sql2000的SqlServerStyle

<property name="dbStyle"> 

 <bean class="org.beetl.sql.core.db.SqlServerStyle">

 </bean>

 </property>


请大神帮助看看,为什么sql2000的分页语句出现错误,谢谢