我想使用 sql 来查询像下面的代码这样的对象。
包裹:
PACKAGE DRAWING AS
TYPE AWARD_NUMBER_ROW IS RECORD (
A_NUMBER VARCHAR2 (10),
A_TYPE char (1)
);
TYPE AWARD_ROW IS RECORD (
A_NUMBER VARCHAR2 (10),
A_NAME VARCHAR2 (50)
);
TYPE AWARD_NUMBER_TABLE IS TABLE OF AWARD_NUMBER_ROW INDEX BY PLS_INTEGER;
TYPE AWARD_TABLE IS TABLE OF AWARD_ROW INDEX BY PLS_INTEGER;
AWARD AWARD_TABLE;
AWARD_T AWARD_TABLE;
PROCEDURE DRAWING (AWARD_NUMBER IN AWARD_NUMBER_TABLE);
END DRAWING;
身体:
create or replace
PACKAGE BODY DRAWING AS
PROCEDURE DRAWING (AWARD_NUMBER IN AWARD_NUMBER_TABLE) AS
BEGIN
EXECUTE IMMEDIATE
'SELECT * FROM AWARD_INF'
BULK COLLECT INTO AWARD_T;
/*
error is from here. AWARD_T does not exist or is marked for delete
*/
SELECT T.* bulk collect into AWARD FROM TABLE(AWARD_T ) T WHERE T.A_NAME = '123456789' ;
END DRAWING;
END INVOICE_DRAWING
这是异常消息。
ORA-21700:对象不存在或标记为删除“对象不存在或标记为删除” *原因:用户试图对不存在或标记为删除的对象执行不适当的操作。固定、删除和更新等操作不能应用于不存在或标记为删除的对象。*操作:用户需要重新初始化引用以引用现有对象,或者用户需要取消标记该对象。
我如何解决它??