以下查询未显示任何输出,但没有任何错误-
select inv_id
from invoice_table
where
INVOICE_DATE BETWEEN to_char(P_INVOICE_START_DATE,'DD-MON-YYYY')AND to_char(P_INVOICE_END_DATE,'DD-MON-YYYY');
我在哪里出错了,我该如何改善?
答案 0 :(得分:0)
我设法找到所有参数均为Varchar2类型的解决方案,并使用FND_DATE.CANONICAL_TO_DATE函数,如下所示
`***...AND T.INVOICE_DATE BETWEEN FND_DATE.CANONICAL_TO_DATE(P_INVOICE_START_DATE) AND FND_DATE.CANONICAL_TO_DATE(P_INVOICE_END_DATE);***`