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

Home -> Community -> Usenet -> c.d.o.server -> PLS-00323: ...must be defined in the package body

PLS-00323: ...must be defined in the package body

From: Lee Farrant <leefarrant_at_hotmail.com>
Date: 2 Aug 2002 04:25:36 -0700
Message-ID: <97ad5817.0208020325.15978bbc@posting.google.com>


could someone help me correct this error please

PLS-00323: subprogram or cursor 'HOWWIDE' is declared in a package specification and must be defined in the package body


CREATE OR REPLACE PACKAGE transpose
IS

FUNCTION howwide (tabname IN VARCHAR2, colname IN VARCHAR2) RETURN INTEGER;

END transpose;

CREATE OR REPLACE PACKAGE BODY transpose AS

FUNCTION howwide (

   tabname IN VARCHAR2,
   colname IN VARCHAR2,
   schname IN VARCHAR2)
   RETURN INTEGER
IS

   cur INTEGER := DBMS_SQL.OPEN_CURSOR;    ignore INTEGER;
   retval INTEGER;
BEGIN
   DBMS_SQL.PARSE (cur

                   ,'SELECT max(thiscount) as (select COUNT(*) as thiscount FROM ' 
                    || schname || '.' 
                    || ' tabname group by colname '
                   , DBMS_SQL.NATIVE);

   DBMS_SQL.DEFINE_COLUMN (cur, 1, retval);    ignore := DBMS_SQL.EXECUTE_AND_FETCH (cur);    DBMS_SQL.COLUMN_VALUE (cur, 1, retval);    DBMS_SQL.CLOSE_CURSOR (cur);
   RETURN retval;
END; END transpose;
/
show errors Received on Fri Aug 02 2002 - 06:25:36 CDT

Original text of this message

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