Ref Curosrs in Oracle 8i
798157Sep 20 2010 — edited Sep 20 2010Hi,
Am currently using the Oracle 8i, i have return ref cursors in oracle 10g.. which is working fine.. but when am trying to use the same in Oracle 8i... am facing lot of problems.. could some one help me on this.. Please.
Oracle 10g:
CREATE OR REPLACE PROCEDURE emp_by_dept (
p_deptno emp.deptno%TYPE
)
IS
emp_refcur SYS_REFCURSOR;
X emp%ROWTYPE;
BEGIN
OPEN emp_refcur FOR SELECT empno, ename FROM emp WHERE deptno = p_deptno;
DBMS_OUTPUT.PUT_LINE('EMPNO ENAME');
DBMS_OUTPUT.PUT_LINE('----- -------');
LOOP
FETCH emp_refcur INTO X;
EXIT WHEN emp_refcur%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(X.EMPNO || ' ' || X.ENAME);
END LOOP;
CLOSE emp_refcur;
END;
Where as 8i Is not working.. i just found that.. we can not do it in 8i using sys refcursor... could some one help me .. little urgent..