create or replace package kit_admin
as
TYPE PackRec IS RECORD (pack_cd VARCHAR2(5));
TYPE crsr IS REF CURSOR RETURN PackRec;
procedure selectPackages(V_crsr OUT crsr);
end kit_admin;
This package gets created nicely but the body is not getting created,,,, Body is as follows.
create or replace package body kit_admin
is
TYPE crsr IS REF CURSOR RETURN PackRec;
procedure selectPackages(V_crsr OUT crsr)
is
V_crsr is
select package_cd from kit_packages;
end selectPackages;
end kit_admin;
the error while creating this body is as follows:
Errors for PACKAGE BODY KIT_ADMIN:
LINE/COL ERROR
-------- -----------------------------------------------------------------
6/10 PLS-00103: Encountered the symbol "SELECT" when expecting one of
the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table LONG_ double ref
char time timestamp interval date binary national character
nchar
9/2 PLS-00103: Encountered the symbol "END" when expecting one of the
following:
begin function package pragma procedure subtype type use
<an identifier> <a double-quoted delimited-identifier> cursor
LINE/COL ERROR
-------- -----------------------------------------------------------------
form current
Please suggest,,
Thanks
What exactly are you trying to do here?
It seems like you're approaching your task with more complicated pl/sql than is necessary...
As martysb asked, what are you trying to accomplish here?