日期:2014-05-17 浏览次数:20962 次
select count(*) from ( select DNAorderno,Order_no,LTime,Settledate,Pay_fee,Commimission,Tel,order_Status,Order_Type from(select b.orderno DNAorderno,a.order_no,a.add_time as LTime,b.settledate,a.pay_fee,null as Commimission,Tel,order_Status,Order_Type from ercp_t_order a left join ercp_payresult b on a.order_no=b.reference where a.pay_id=5 and a.pay_status=1 ) where ( LTime >='2012-02-19 00:00:00.000' and LTime<='2012-03-19 23:59:59.999' and 1=1 ) ) t
select count(*) from ( select DNAorderno, Order_no, LTime, Settledate, Pay_fee, Commimission, Tel, order_Status, Order_Type from(select b.orderno DNAorderno, a.order_no, a.add_time as LTime, b.settledate, a.pay_fee,null as Commimission, Tel,order_Status, Order_Type from ercp_t_order a left join ercp_payresult b on a.order_no=b.reference where a.pay_id=5 and a.pay_status=1 ) test where test.LTime >=to_date('2012-02-19 00:00:00.000','你需要的日期格式') and test.LTime<=to_date('2012-03-19 23:59:59.999','你需要的日期格式') and 1=1 ) t
------解决方案--------------------
to_timestamp('2012-02-19 00:00:00.000','yyyy-mm-dd hh24:mi:ss.ff3')