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

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Logic Help Needed...

PL/SQL Logic Help Needed...

From: Tim Smith <timasmith_at_hotmail.com>
Date: 19 Sep 2004 19:46:29 -0700
Message-ID: <a7234bb1.0409191846.2938318a@posting.google.com>


Hi,

I have a table as follows

   pk_id status

   1        P
   2        P
   3...     U
   30       U

I want to return a reference cursor for the next 5 (by order of pk_id) records and (within this PL/SQL) set the status to Q so that if the procedure is executed again it never returns the same record.

I believe I need to

  1. select for update a list of U's e.g. 3,4,5,6, and 7
  2. set status to Q
  3. return a ref cursor for the original 5 records

Is this possible without using a (physical) temporary table in version 8.0.5 (yes, upgrade pending..). A data structure would be fine if possible. Received on Sun Sep 19 2004 - 21:46:29 CDT

Original text of this message

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