Package creation issues using SQL Developer
- by Carter
So I've never worked with stored procedures and have not a whole lot of DB experience in general and I've been assigned a task that requires I create a package and I'm stuck.
Using SQL Developer, I'm trying to create a package called JUMPTO with this code...
create or replace package JUMPTO is
type t_locations is ref cursor;
procedure procGetLocations(locations out t_locations);
end JUMPTO;
When I run it, it spits out this PL/SQL code block...
DECLARE
LOCATIONS APPLICATION.JUMPTO.t_locations;
BEGIN
JUMPTO.PROCGET_LOCATIONS(
LOCATIONS = LOCATIONS
);
-- Modify the code to output the variable
-- DBMS_OUTPUT.PUT_LINE('LOCATIONS = ' || LOCATIONS);
END;
A tutorial I found said to take out the comment for that second line there. I've tried with and without the comment.
When I hit "ok" I get the error...
ORA-06550: line 2, column 32:
PLS-00302: component 'JUMPTO' must be declared
ORA-06550: line 2, column 13:
PL/SQL: item ignored
ORA-06550: line 6, column 18:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 5, column 3:
PL/SQL: Statement ignored
ORA-06512: at line 58
I really don't have any idea what's going on, this is all completely new territory for me. I tried creating a body that just selected some stuff from the database but nothing is working the way it seems like it should in my head. Can anyone give me any insight into this?