We help IT Professionals succeed at work.
Get Started

PLS-00382: expression is of wrong type

Isaac
Isaac asked
on
1,418 Views
Last Modified: 2013-12-18
I have an oracle package, see below, and I keep getting the error "PLS-00382: expression is of wrong type" but can't figure out why.  The error keeps pointing to the 2nd procedure.  The first one works fine when I compiled it by itself.  The second one does not compile when I compile it by itself or with other procedures in a package.  What am I doing wrong?
Please help.

I'm using oracle 10g

Thanks.
CREATE OR REPLACE PACKAGE BODY "SP_SELECT_DOCLOG_RPT_PKG" AS 
PROCEDURE SP_SELECT_DOCLOG_RPT_PROC (
    thisQueryType IN OUT SP_SELECT_DOCLOG_RPT_PKG.thisQuery,
    PF_STARTING_DATE IN OGC_TBL.DATE_IN%TYPE,
    PF_ENDING_DATE IN OGC_TBL.DATE_IN%TYPE,
    PF_STATUS IN VARCHAR2,
    PF_ASSIGNED IN OGC_TBL.ASSIGNED%TYPE
)
IS
BEGIN
OPEN thisQueryType FOR
    SELECT CASE_NUMBER, CASE_TYPE, ORIGINATOR, SUBJECT,
         DESCRIPTION, DATE_IN, DATE_OUT, DUE_DATE, ASSIGNED,
         POC_LAST_NAME||'  '||POC_FIRST_NAME FULL_NAME,
         COMMENTS, CATEGORY_CD
      FROM OGC_TBL
      WHERE (DATE_IN >= PF_STARTING_DATE AND DATE_IN <= PF_ENDING_DATE) AND
            (ASSIGNED LIKE PF_ASSIGNED)  AND ((PF_STATUS = 'A')  OR (PF_STATUS = 'C' AND DATE_OUT IS NOT NULL) OR (PF_STATUS = 'O' AND DATE_OUT IS NULL))
      ORDER BY ASSIGNED, SUBJECT, CASE_NUMBER;
END SP_SELECT_DOCLOG_RPT_PROC;
PROCEDURE SP_SUB_CONS_RPT_PROC (
    thisQueryType IN OUT SP_SELECT_DOCLOG_RPT_PKG.thisQuery,
    PF_STARTING_DATE IN OGC_TBL.DATE_IN%TYPE,
    PF_ENDING_DATE IN OGC_TBL.DATE_IN%TYPE
)
IS
BEGIN
OPEN thisQueryType FOR
SELECT T1.CASE_NUMBER, T1.DATE_IN, T1.DATE_OUT, T1.SUBJECT,    
         T1.CATEGORY_CD
   FROM OGC_TBL T1
   WHERE ((T1.DATE_IN BETWEEN PF_STARTING_DATE AND PF_ENDING_DATE AND   
                     T1.DATE_OUT IS NOT NULL) OR
                    (T1.DATE_OUT BETWEEN PF_STARTING_DATE AND PF_ENDING_DATE))   
                  AND
                    (T1.SUBJECT LIKE 'CONSEN%' OR T1.SUBJECT LIKE 'SUBP%' OR 
                     T1.SUBJECT LIKE 'NON%' OR T1.CATEGORY_CD = 'CONSE' OR   
                     T1.CATEGORY_CD = 'NCONS' OR
                     T1.CATEGORY_CD = 'SUBPO')
      ORDER BY CATEGORY_CD, CASE_NUMBER, DATE_IN;
END SP_SUB_CONS_RPT_PROC;
END SP_SELECT_DOCLOG_RPT_PKG;

Open in new window

Comment
Watch Question
Database Developer & Administrator
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2012
Commented:
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE