我正在尝试使用来自 oracle apex 进程的更新查询来更新表。为此,我需要从表格形式中获取一个值。但是该字段当前被禁用(不可编辑,值仍然存在),在这里我收到错误“ORA-01403:未找到数据”。如果我启用了该字段,那么问题就会出现(但该字段将是可编辑的,我不想使该字段可编辑)。
该数据(禁用的数据)已经保存在表中(在该字段被禁用之前)。现在我已经编写了一个绕过该错误的条件(例如。IF APEX_APPLICATION.G_F03(i) IS NOT NULL THEN)。但是我仍然遇到同样的错误(如上所述)。
因此,如下面的代码所示'因为 apex_application.g_f03(i) 被禁用,它给了我错误'ORA-01403: no data found',而 apex_application.g_f04(i) 没有给我任何错误。如果我启用了 apex_application.g_f03(i) 字段,那么错误就会消失。
FOR i IN 1 ..apex_application.g_f01.count LOOP
if ((:P2_M1= 'f03') AND (apex_application.g_f03(i) IS NOT NULL)) then
------------------------------------------------------------------------------------
select count(*) into v_count from SCHEMA1.TABLE1
where ATTRIBUTE_CODE = apex_application.g_f02(i)
and header_id = :P2_X_HEADER_ID
and rating_001 is not null ;
------------------------------------------------------------------------------------
update SCHEMA1.TABLE1
set LAST_UPDATE_DATE = sysdate,
LAST_UPDATED_BY = :F2221_USER_ID,
RATING_001 = apex_application.g_f03(i),
STATUS = 'NEW'
where ATTRIBUTE_CODE = apex_application.g_f02(i)
and header_id = :P2_X_HEADER_ID;
--------------------------------------------------------------
END IF;
if ((:P2_M2 = 'f04') AND (apex_application.g_f04(i) IS NOT NULL)) then
------------------------------------------------------------------------------------
select count(*) into v_count from SCHEMA1.TABLE1
where ATTRIBUTE_CODE = apex_application.g_f02(i)
and header_id = :P2_X_HEADER_ID
and rating_002 is not null ;
------------------------------------------------------------------------------------
update SCHEMA1.TABLE1
set LAST_UPDATE_DATE= sysdate,
LAST_UPDATED_BY = :F2221_USER_ID,
RATING_002 = apex_application.g_f04(i),
STATUS = 'NEW'
where ATTRIBUTE_CODE = apex_application.g_f02(i)
and header_id = :P2_X_HEADER_ID;
------------------------------------------------------------------------------------
END IF;
end loop;
我希望得到这个 apex_application.g_f03(i) 字段的值(即使它被禁用)或绕过它。