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 -> Cursor problem

Cursor problem

From: <soalvajavab1_at_yahoo.com>
Date: 27 Feb 2007 13:27:49 -0800
Message-ID: <1172611669.600170.188190@8g2000cwh.googlegroups.com>


I have a situation that have a cursor defined and need to add the resukt of the following query to its where clause:

select max(last_update_date)
into v_last_run
from sa_service_request
where last_update_user = 'FRANK_PIA';

I mean it needs to be like this:

   CURSOR pia1
   IS

     SELECT t1.service_request_no, t1.problem_description
        FROM sa_service_request t1
       WHERE t1.service_request_status = 'FINISHED'
         AND t1.finished_date >= v_last_run

If I could have my select max() statment in DECLARE part of Stored Proc then I would be OK. I don't want to go with REF Cursor if possible. Is there anyway to easily do that? Received on Tue Feb 27 2007 - 15:27:49 CST

Original text of this message

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