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');
问问题
88 次
1 回答
0
尝试这个:
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');
您的查询中有什么错误?
您在 . 之后的第二次比较中错过了date
关键字and
。您的查询应如下所示:
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');
于 2019-04-24T12:25:17.327 回答