我正在 SQL Server 上执行以下查询,但出现错误:
SELECT DISTINCT t1.p_id "Id",
(TO_CHAR("sysdate", 'YYYY') + least(SIGN(("sysdate" - to_date('01-Aug-' | | TO_CHAR("sysdate", 'YYYY'), 'DD-Mon-RRRR'))), 0)) "Year"
FROM
t1,
t7,
t9
WHERE
t9.ei_id(+) = t7.e_id
AND (t7.e_student = t1.p_id)
AND (t7.e_module = t8.m_id)
AND (NVL(t9.ei_q18m06, t7.e_end) > '31-Jul-' | | (TO_CHAR("sysdate", 'YYYY') + least(SIGN(("sysdate" - to_date('01-Aug-' | | TO_CHAR("sysdate", 'YYYY'), 'DD-Mon-RRRR'))), 0) + - 5))
Error:
'nvl' is not a recognized built-in function name.
知道如何避免这种情况吗?