oracle.分页,Oracle 分页

//分页开始

String strKey=session.getId();

String beginTime=(String)session.getAttribute(strKey+"beginTime");

String endTime=(String)session.getAttribute(strKey+"endTime");

String staType = request.getParameter("staType");//统计类型:颁发、注销、作废、恢复注销、遗失

String passTarget = request.getParameter("passTarget");//证件类型

String selectSql="select P.ST_PASS_CODE gb1,P.ST_NAME gb2,(select ST_NAME_SHORT from T_PASS_ISSUE_DEPT where ST_PASS_ISSUE_DEPT_CODE = P.ST_ISSUE_DEPT_ID) gb3,to_char(P.DT_ISSUE,'yyyy-MM-dd') gb4,to_char(P.DT_EXPIRE,'yyyy-MM-dd') gb5,to_char(P.DT_NULLIFY,'yyyy-MM-dd') gb6,p.ST_COMMENT gb7";

String fromSql=" from T_PASS P";

String whereSql=" where P.DT_ISSUE >= to_date('" + beginTime + "', 'yyyy-MM-dd') and P.DT_ISSUE <= to_date('" + endTime + "', 'yyyy-MM-dd') and P.ST_ISSUE_DEPT_ID = '24'";

if(staType.equals("颁发")){

whereSql += " and P.ST_PASS_TYPE='" + passTarget + "'";

}else if(staType.equals("注销")){

whereSql=" where P.DT_NULLIFY >= to_date('" + beginTime + "', 'yyyy-MM-dd') and P.DT_NULLIFY <= to_date('" + endTime + "', 'yyyy-MM-dd') and P.ST_ISSUE_DEPT_ID = '24'";

whereSql += " and P.ST_PASS_TYPE='" + passTarget + "' and P.ST_STATE ='注销'";

}else{

whereSql=" where P.DT_NULLIFY >= to_date('" + beginTime + "', 'yyyy-MM-dd') and P.DT_NULLIFY <= to_date('" + endTime + "', 'yyyy-MM-dd') and P.ST_I

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值