22,209
社区成员
发帖
与我相关
我的任务
分享
select top " + limit + " * from View_jydhwxx where fgsbm in (" + fgsbm + ") and jhrq >= '" + jdsj1 + "' and jhrq <= '" + jdsj2 + "' and jydbh not in(select top " + start + " jydbh from View_jydhwxx where fgsbm in (" + fgsbm + ") and jhrq >= '" + jdsj1 + "' and jhrq <= '" + jdsj2 + "' order by jydbh desc) order by jydbh desc
select top " + limit + " * from View_jydhwxx where fgsbm in (" + fgsbm + ") and dzzbm in ("+result+") and jhrq >= '" + jdsj1 + "' and jhrq <= '" + jdsj2 + "' and jydbh not in(select top " + start + " jydbh from View_jydhwxx where fgsbm in (" + fgsbm + ") and dzzbm in ("+result+") and jhrq >= '" + jdsj1 + "' and jhrq <= '" + jdsj2 + "' order by jydbh desc) order by jydbh desc
string sql="select * from (
select row_number() over(order by name) rn,* from View_jydhwxx where fgsbm
in (" + fgsbm + ") and jhrq >= '" + jdsj1 + "' and jhrq <= '" + jdsj2 + "'
order by jydbh desc) t
where rn between " + start + " and " + start+limit;