我尝试使用以下存储过程将一个表记录从一个模式表复制到另一个模式表。
CREATE OR REPLACE PROCEDURE ARCHIVE_DATA
AS
cursor C_BRIC_EXTRACT
is
select pend_date, pend_note, record_id, suspense_cd, suspense_date from DEV_SWIMLANE2.billing_record_invoiced_code;
BEGIN
FOR C_EXTRACT_BRIC_REC IN C_BRIC_EXTRACT
LOOP
BEGIN
INSERT INTO
DEV_ARCHIVE.BRIC_ARCHV(SUSPENSE_CD,RECORD_ID,SUSPENSE_DATE,PEND_DATE,PEND_NOTE)
VALUES
(C_EXTRACT_BRIC_REC.SUSPENSE_CD, C_EXTRACT_BRIC_REC.RECORD_ID, C_EXTRACT_BRIC_REC.SUSPENSE_DATE, C_EXTRACT_BRIC_REC.PEND_DATE, C_EXTRACT_BRIC_REC.PEND_NOTE);
COMMIT;
END;
END LOOP;
END;
但我收到以下错误消息:
17:20:27 [CREATE - 0 row(s), 0.000 secs] [Error Code: 1031, SQL State: 42000] ORA-01031: insufficient privileges
17:20:27 [BEGIN - 0 row(s), 0.000 secs] [Error Code: 6550, SQL State: 65000] ORA-06550: line 8, column 159:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
;
17:20:27 [COMMIT - 0 row(s), 0.293 secs] Command processed. No rows were affected
17:20:28 [END - 0 row(s), 0.000 secs] [Error Code: 900, SQL State: 42000] ORA-00900: invalid SQL statement
17:20:29 [END - 0 row(s), 0.000 secs] [Error Code: 900, SQL State: 42000] ORA-00900: invalid SQL statement
17:20:29 [END - 0 row(s), 0.000 secs] [Error Code: 900, SQL State: 42000] ORA-00900: invalid SQL statement
请帮助我如何设置权限,也请让我知道我在 oracle 中的存储过程是否有任何问题。