【发布时间】:2012-12-02 13:59:13
【问题描述】:
我在 PL-SQL 中有一个查询。我想选择与当前日期差大于一天和其他一些条件的记录...
select round(sysdate - u.RecordDate) as deleteme,
round(sysdate - u.Payment_date) as payment,
nvl(isverified, 0) as Verified
from user_cards u
where ((round(sysdate - u.RecordDate) > 0) || (round(sysdate - u.Payment_date) > 0))
and nvl(isverified, 0) = 0
order by id desc
但是这里有问题 where ((round(sysdate - u.RecordDate) > 0) || (round(sysdate - u.Payment_date) > 0))
我知道如何获取日期差异超过一天的记录吗???
【问题讨论】:
-
你可能想写
OR而不是||(字符串连接运算符)
标签: sql oracle date select plsql