Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PLS-00201 when compiling function with cursor as parameter

PLS-00201 when compiling function with cursor as parameter

From: <wilsonr_at_logica.com>
Date: 20 Jan 2006 13:43:03 -0800
Message-ID: <1137793383.226094.214390@g14g2000cwa.googlegroups.com>


I am trying ot use table functions for the first time so i'm not too sure if i'm doing this all wrong anyway.

I have created a ref cursor in a package. Then i have a script to create a function that will use that cursor as an IN parameter (to eventually be called in some SQL)

the package created fine

when i try and compile the function I get a PLS-20001. I have googled around and the only suggestion i have seen that seems to fit is that the pl/sql engine/parser sometimes lags behind the sql engine. But I dont really know what this means or how to get the pl/sql engine to catch up.

I am using the same user to run these scripts and I can see the types/package when i query user_objects.

What exactly am i doing wrong?

my (trimmed) code is copied below (excuse the function if it has other errors in it, but i cant get past this one to start looking at the others)

CREATE OR REPLACE PACKAGE pkg_test IS

END;
/

CREATE OR REPLACE FUNCTION cursor_function (p_dept_cur IN pkg_test.dept_cur_type) RETURN emp_details_table_type IS

emp_details_table emp_details_table_type; dept_rec p_dept_cur%ROWTYPE;

BEGIN LOOP
FETCH p_dept_cur INTO dept_rec;
EXIT WHEN p_dept_cur%NOTFOUND;

END LOOP; RETURN emp_details_table;

END;
/ Received on Fri Jan 20 2006 - 15:43:03 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US