我得到CALL Failed. [7691] SP_name:Table used in cursor select is restructured from compile-time to run-time.
我相信这是因为我在存储过程中循环遍历了日期:
If min_mnth <= max_mnth THEN
LoopMnth:
FOR cc_mnth AS cc_cdates CURSOR FOR
SELECT To_Char(calendar.calendar_date, 'yyyy-mm') as mnth
from sys_calendar.calendar
where To_Char(calendar.calendar_date, 'yyyy-mm') between min_mnth and max_mnth
and mnth not in (select report_mnth from tb1)
and mnth >= '2017-08'
group by 1 order by 1
.....
一个有趣的事实是,这样的过程有时会起作用,大部分时候我的循环迭代次数就会减少。
他们建议SET SESSION DATEFORM = INTEGERDATE
-同样的错误。
此错误是什么以及如何解决?
答案 0 :(得分:0)
然后您将得到这样的错误
1) SET SESSION DATEFORM = INTEGERDATE
2) Recreate your procedure