请问你能帮我吗?

Pls can you help me?

select count(*) 
from ibc_offer 
where DEACTIVATION_DTTM > date ('31.12.9999 23:00:00','DD.MM.YYYY HH:MI:SS')
and DEACTIVATION_DTTM < ('31.12.9999 23:59:59','DD.MM.YYYY HH:MI:SS');

试试这个:

select count(*) 
from ibc_offer 
where DEACTIVATION_DTTM > TO_DATE('31/12/9999 23:00:00','dd/mon/yyyy HH24:MI:SS')
and DEACTIVATION_DTTM < TO_DATE('31/12/9999 23:59:59','dd/mon/yyyy HH24:MI:SS');

你的查询有什么错误?

您在 and 之后的第二次比较中错过了 date 关键字。您的查询应如下所示:

select count(*) 
from ibc_offer 
where DEACTIVATION_DTTM > date('31.12.9999 23:00:00','DD.MM.YYYY HH:MI:SS')
and DEACTIVATION_DTTM < date('31.12.9999 23:59:59','DD.MM.YYYY HH:MI:SS');