コンパイルすると、次のようなエラーが発生しますPLS- 00103 "cur1" when expecting one of the following
CREATE OR REPLACE PACKAGE BODY SSS IS
PROCEDURE sample1(obj_CustomerID IN varchar2,
obj_DelUserID IN varchar2,
cur1 OUT T_CURSOR1,
cur2 OUT T_CURSOR2)IS
BEGIN
TEMP_CUR1 cur1%ROWTYPE;
TEMP_CUR2 cur2%ROWTYPE;
OPEN cur1 FOR
select distinct cf.fleet_id, cf.fleet_name, cf.customer_id
from customer_fleet cf, vehicle_register vr, asset_register ar
where cf.customer_id = vr.customer_id
and cf.fleet_id = vr.fleet_id
and vr.vehicle_id = ar.vehicle_id
and vr.customer_id = ar.customer_id
and vr.is_active = 'Y'
and cf.is_active = 'Y';
FETCH cur1
into temp_cur1;
close cur1;
OPEN CUR2 FOR
select TEMP_CUR1.fleet_id,
TEMP_CUR1.fleet_name,
TEMP_CUR1.customer_id
from cur1
where customer_id = obj_CustomerID;
FETCH CUR2
INTO TEMP_CUR2;
CLOSE CUR2;
end Sample1;
END SSS;
エラーは行で発生します
TEMP_CUR1 cur1%ROWTYPE;
TEMP_CUR2 cur2%ROWTYPE;