语言:RPGLE
exec sql
declare c1_RC0113_PLP04
sensitive
scroll
cursor for
select ROW_NUMBER() over ( order by A4KQTT ) as rownbr,
A4KQTT,
A4SCAC,
'0',
' '
from PLP04
where A4KQTT >= :#SCACDESC
and A4A8TA = 'A'
and A4KQTT > ' '
order by A4KQTT;
SQL Error:
Message ID . . . . . . : SQL0243 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 10/01/19 Time sent . . . . . . : 16:55:33
Message . . . . : SENSITIVE cursor C1_RC0113_PLP04 cannot be defined for the
specified SELECT statement.
Cause . . . . . : The cursor C1_RC0113_PLP04 is defined as SENSITIVE but the
query requires the creation of a temporary result table. If the SELECT
statement has a data change table reference, it requires a temporary result
table. A SENSITIVE cursor cannot be implemented.
Recovery . . . : Redefine the cursor as ASENSITIVE or INSENSITIVE or change
the query so that it no longer requires the creation of a temporary result
table.
我假设由于over()而收到错误消息?
我使用敏感的原因是,如果发生插入/更新,我想向文件显示它们。
提前感谢。
是。必须具体化游标才能为每一行计算此类OLAP函数的结果。这就是为什么您不能将其定义为敏感的原因。