Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Ref Curosrs in Oracle 8i

798157Sep 20 2010 — edited Sep 20 2010
Hi,

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..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2010
Added on Sep 20 2010
2 comments
607 views