ORA-00932:inconsistent datatypes:expected CHAR got DATE

当查询时候 有null相减就会出现以上情况
SELECT NULL - SYSDATE FROM dual;

处理为  select 0 - nvl(SYSDATE,0) FROM dual;

实际例子:
(nvl(t11.begin_time,to_date('1990/1/1 00:00:00','yyyy/mm/dd hh24:mi:ss')) - nvl(t22.begin_time,to_date('1990/1/1 00:00:00','yyyy/mm/dd hh24:mi:ss'))) * 24 * 60 as dif

你可能感兴趣的:(expect)