Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL: Return types of Result Set variables or query do not match
Hi all,
i'm trying to put a cursor fetch in a rowtype variable but apparaintly oracle disagrees the way i do that by answering : PL/SQL: Return types of Result Set variables or query do not match
here is my code ...
CREATE OR REPLACE PACKAGE pkg AS
TYPE ref_cur IS REF CURSOR;
PROCEDURE loop_prxetu ( cur_prxetu IN OUT ref_cur, rec IN OUT
prxetu%ROWTYPE );
PROCEDURE dateshiftpdt ( cur_prxetu IN OUT ref_cur , rec IN OUT
prxetu%ROWTYPE );
END pkg;
/
CREATE OR REPLACE PACKAGE BODY pkg AS
PROCEDURE loop_prxetu ( cur_prxetu IN OUT ref_cur, rec IN OUT
prxetu%ROWTYPE ) IS
BEGIN
OPEN cur_prxetu FOR SELECT idntecprxetu FROM prxetu;
LOOP
FETCH cur_prxetu INTO rec;
update prxetu set DATEFFPRXETU=TO_DATE('&2','YYYYMMDDHH24MISS')
where idntecprxetu = rec.idntecprxetu and
dateffprxetu=TO_DATE('&1','YYYYMMDDHH24MISS');
DBMS_OUTPUT.PUT_LINE( 'PRXETU' || ';' || rec.idntecprxetu || ';'
|| 'Modif date' );
END LOOP;
CLOSE cur_prxetu;
END loop_prxetu;
PROCEDURE dateshiftpdt ( cur_prxetu IN OUT ref_cur, rec IN OUT
prxetu%ROWTYPE ) IS
BEGIN
loop_prxetu( cur_prxetu , rec );
END dateshiftpdt;
END pkg;
/
DECLARE
cur_prxetu pkg.ref_cur;
rec prxetu%ROWTYPE;
BEGIN
IF ( '&3' = 'PDT') THEN
pkg.dateshiftpdt( cur_prxetu , rec);
END IF;
END;
/
thank's for any help :) Received on Wed Mar 31 2004 - 04:03:35 CST