日期时间添加上的无效数字 Oracle SQL



我相信此表中的某些行中有一些错误的数据。当我尝试这样的事情时,我得到的是无效号码......其他表不会导致问题。

有什么方法可以防止查询失败吗?

where to_char(t1.create_date) 
between to_char(t2.create_date - INTERVAL '10' MINUTE) and
to_char(t2.create_date + INTERVAL '10' MINUTE)

你可以做这样的事情:

where t1.create_date
between (t2.create_date - 10/1440) and (t2.create_date + 10/1440)

最新更新