sql="select row_number() over(order by id asc) rownum ,id from "+tableName+" where pbtj=0 ";
sql=sql+conditions;
sql="select top 1 a.id from ( "+sql+" ) a where a.rownum>"+startindex;
StringqueryDatatablesql="select top "+pageSize+" a.id as 'key',b.lastname,a.* from "+tableName+" a left join hrmresource b on a.pbdxry=b.id where a.id>=("+sql+") "+conditions;
sql="select row_number() over(order by id asc) rownum ,id from "+tableName+" where pbtj=0 ";
sql=sql+conditions;
sql="select top 1 a.id from ( "+sql+" ) a where a.rownum>"+startindex;
StringqueryDatatablesql="select top "+pageSize+" a.id as 'key',b.lastname,a.* from "+tableName+" a left join hrmresource b on a.pbdxry=b.id where a.id>=("+sql+") "+conditions;
StringqueryDatatablesql="select a.id as `key`,b.lastname,a.* from "+tableName+" a left join hrmresource b on a.pbdxry=b.id where a.id>=("+sql+") "+conditions+" limit "+pageSize;