PL/SQL issue with invalid results

From: JAW <>
Date: Wed, 9 Jul 2008 09:43:56 -0700 (PDT)
Message-ID: <>

I can run a query in SQPLUS and get results I need.

Select col1

               From tab1 sch, tab2 cmn

                 and cmn.joinid = sch.joinid

                 AND completion_dttm > TO_DATE('06/30/2008', 'MM/DD/
                 AND completion_dttm < TO_DATE('06/30/2008', 'MM/DD/
YYYY') + 1
                 and crew = 'ZZZ'

               ORDER BY  completion_dttm;

I have the same query in a procedure that I pass parmss and I get no rows (It has a REF CUROSR).

var x refcursor
exec proc1('ZZZ','06/30/2008',:x);
print x

Below are the changes for the PL/SQL including the parameter

When executed no rows are found.

proc1(engineer IN VARCHAR2, whichday IN VARCHAR2, cur_out OUT oracle_pkg.listCursor)

AND completion_dttm > TO_DATE(whichday, 'MM/DD/YYYY')

                 AND completion_dttm < TO_DATE(whichday, 'MM/DD/YYYY')
+ 1
                 AND crew = engineer
Received on Wed Jul 09 2008 - 11:43:56 CDT

Original text of this message