![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm using Oracle 10g and trying to compile a package. But my PL/SQL Developer tool complains at this line: show err package body RE_PKG saying "Invalid SQL statement". What is the correct syntax? Below is my complete package definition: Thanks, - Dave ====================begin file =============================== create or replace type FLOW_IDS_ARRAY as table of NUMBER; create or replace package RE_PKG IS PROCEDURE set_trial_corps(p_corp_sysprin IN VARCHAR2, p_flows_arr IN FLOW_IDS_ARRAY, p_errorMsg OUT VARCHAR2); END RE_PKG; / create or replace package body RE_PKG IS PROCEDURE set_trial_corps(p_corp_sysprin IN VARCHAR2, p_flows_arr IN FLOW_IDS_ARRAY, p_errorMsg OUT VARCHAR2) IS BEGIN DELETE FROM RE_TRIAL_CORP_FLOWS WHERE CORP_SYSPRIN = p_corp_sysprin; FOR elem in 1 .. flows_arr.count LOOP INSERT INTO RE_TRIAL_CORP_FLOWS (ID, CORP_SYSPRIN, FLOW_ID) VALUES (RE_TRIAL_CORP_FLOWS_PK_SEQ.nextval, corp_sysprin, elem); END LOOP; COMMIT; EXCEPTION WHEN OTHERS THEN ROLLBACK; END set_trial_corps; END RE_PKG; / show err package body RE_PKG =======================End file ====================================== |
#3
| |||
| |||
|
|
Hi, I'm using Oracle 10g and trying to compile a package. *But my PL/SQL Developer tool complains at this line: show err package body RE_PKG saying "Invalid SQL statement". *What is the correct syntax? *Below is my complete package definition: Thanks, - Dave ====================begin file =============================== create or replace type FLOW_IDS_ARRAY as table of NUMBER; create or replace package RE_PKG IS * * * * PROCEDURE set_trial_corps(p_corp_sysprin IN VARCHAR2, p_flows_arr IN FLOW_IDS_ARRAY, p_errorMsg OUT VARCHAR2); END RE_PKG; / create or replace package body RE_PKG IS * * * * PROCEDURE set_trial_corps(p_corp_sysprin IN VARCHAR2, p_flows_arr IN FLOW_IDS_ARRAY, p_errorMsg OUT VARCHAR2) IS * * * * BEGIN * * * * * * * * DELETE FROM RE_TRIAL_CORP_FLOWS WHERE CORP_SYSPRIN = p_corp_sysprin; * * * * * * * * FOR elem in 1 .. flows_arr.count LOOP * * * * * * * * * * * * INSERT INTO RE_TRIAL_CORP_FLOWS (ID, CORP_SYSPRIN, FLOW_ID) VALUES (RE_TRIAL_CORP_FLOWS_PK_SEQ.nextval, corp_sysprin, elem); * * * * * * * * END LOOP; * * * * * * * * COMMIT; * * * * EXCEPTION * * * * * * * * WHEN OTHERS THEN * * * * * * * * * * * * ROLLBACK; * * * * END set_trial_corps; END RE_PKG; / show err package body RE_PKG =======================End file ====================================== |
![]() |
| Thread Tools | |
| Display Modes | |
| |