Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00201 - identifier declaration error - in resultset query
PLS-00201 - identifier declaration error - in resultset query [message #221539] Tue, 27 February 2007 06:26 Go to next message
Jegathees
Messages: 8
Registered: December 2005
Location: Coimbatore
Junior Member
Dear friends,

I created one stored procedure using resultset concept instead of cursor in my oracle database (Oracle 10g Enterprise Edition Release 10.2.0.1.0). The stored procedure is
------------------------------------------------------
create or replace procedure sp_stud( p_cursor in out types.cursorType )
as
begin
open p_cursor for select * from student where readflag = ' ';
end;
------------------------------------------------------
While save this SP, it shows the following error.

PLS-00201: identifier 'TYPES.CURSORTYPE' must be declared.

Friends, I am new to PL/SQL Stored procedure concepts. Could you kindly help me to solve this problem ?

Thanking you.

Kind Regards,
Jegatheeswaran P.







While save the query, it shows the error

PLS-00201: identifier 'TYPES.CURSORTYPE' must be declared.
Re: PLS-00201 - identifier declaration error - in resultset query [message #221547 is a reply to message #221539] Tue, 27 February 2007 07:12 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
The error means that the procedure references a ref cursor type called CURSORTYPE, which is meant to be defined in the package header of the package TYPES, but for some reason, it can't see that ref cursor definition.
Re: PLS-00201 - identifier declaration error - in resultset query [message #221569 is a reply to message #221547] Tue, 27 February 2007 08:29 Go to previous messageGo to next message
Jegathees
Messages: 8
Registered: December 2005
Location: Coimbatore
Junior Member
Hi JRowbottom

Thanks for your reply. Could you kindly tell 'how to define CURSORTYPE in the package header of package TYPES'.

Expecting your reply.

Thanks
Re: PLS-00201 - identifier declaration error - in resultset query [message #221584 is a reply to message #221569] Tue, 27 February 2007 09:40 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
CREATE OR REPLACE PACKAGE types AS
  TYPE Cursortype IS REF CURSOR;
END; 


How come you're using this Ref Cursor, but you don't have it defined?
Previous Topic: Updating....
Next Topic: spool table script
Goto Forum:
  


Current Time: Thu Dec 05 19:05:30 CST 2024