分页控件加了查询条件应该怎么用
with temptable as(
select row_number() over(order by cid ) rowid,* from customertable
)
select * from temptable where rowid between 1(@pageStarIndex) and 1+2-1(@pageStarIndex+@pageSize-1)
这是没有查询条件的用法
但是我现在想加查询条件应该怎么用请大家帮忙我是这样写的不行
with temptable as
(
select row_number() over(order by cid ) rowid,* from customertable
)
select * from temptable where rowid between 1(@pageStarIndex) and 1+2-1(@pageStarIndex+@pageSize-1) and (clientitem='' or sinfoname='余露' or clientco='' or times='') order by times desc