select
'YJ015'quotaCode,CONCAT('00-',to_char(sysdate-1/24,'HH24')) timeQuantum,count(1) quotaPresent
from
T_INVOICE_HISTORY
where
INVOICESTATE=1
and
APPLYDATE <![CDATA[ >= ]]> '2018-12-21 00:00:00'
and
APPLYDATE <![CDATA[ <= ]]> sysdate-1/24
select to_date(concat(TO_CHAR(sysdate-1,'yyyy-MM-dd 00:00:00'),' 00:00:00')) from dual;
select TO_CHAR(sysdate-1,'yyyy-MM-dd') from dual;
select sysdate-1 from dual;
select
'YJ015'quotaCode,CONCAT('00-',to_char(sysdate-1/24,'HH24')) timeQuantum,count(1) quota_present
from
T_INVOICE_HISTORY
where
INVOICESTATE=1
and
APPLYDATE >= '2018-12-21 00:00:00'
and
APPLYDATE <= sysdate-1/24
select extract (hour from to_char(sysdate,'yyyy-MM-dd HH24:mi:ss') ) hour from dual;
select extract(day from sysdate) from dual;
select sysdate() from dual;
select extract (hour from to_char(sysdate,'yyyy-MM-dd HH24:mi:ss') ) hour from dual;
select to_char(sysdate-1/24,'HH24') from dual;
select sysdate-1/24 from dual;