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 -> Using functions in procedure cursor

Using functions in procedure cursor

From: Greg <g_rock99_at_hotmail.com>
Date: 21 Mar 2002 10:39:24 -0800
Message-ID: <ba201474.0203211039.20ce2d44@posting.google.com>


I am trying to use an Oracle stored procedure that takes an cursor parameter to be used with a SeaGate report. The procedure was working fine until I began using a custom function in the Select statement of the cursor. It looks something like this:

CREATE OR REPLACE PROCEDURE TEST (cur_cbsus IN OUT S9028K01.CINFO_TYPE,
whls_name IN CHAR, subm_str_dte IN DATE, subm_end_dte IN DATE) IS
BEGIN    OPEN cur_cbsus FOR
    SELECT ..., testpack.contract (to_char(buid.bunit_num), to_char

        (prodid.prod_num),submitem.submitem_dt_cbk_invoice)
      FROM  ...;

END;... The function is within a package "testpack". When I run the simple select from a SQL PLUS environment it comes pack in under 1 minute. However, it hadn't finished in over 2 hours in crystal, so I tried to run the procedure in an anonymous block and the same problem occured. The procedure works fine in both if I comment the function out. Why does the use of a function in a select statement within a cursor/procedure cause this? What can I do?

Thanks,
Greg Received on Thu Mar 21 2002 - 12:39:24 CST

Original text of this message

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