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 -> Re: Remove rows from a cursor?

Re: Remove rows from a cursor?

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 02 Jul 2002 16:02:16 GMT
Message-ID: <3D21CE64.46D0565@exesolutions.com>


Brian Brane wrote:

> I have a table that contains product prices and end dates as in:
> 1) product: A price: .10 thru: Jan 15
> 2) product: A price: .15 thru: Mar 20
> 3) product: A price: .20 thru: Apr 30
>
> I want to select all rows that contain prices for January. In this
> case, row 1 contains the price for Jan 1 to Jan 15. Row 2 contains
> the price for the remainder of January.
>
> It seems the most efficient way to do this is to select all rows
> where THRU >= Jan 1 and then loop through the rows in a cursor
> and decide which rows are needed. My question is, how can I delete
> rows from the cursor that I don't need or create a new cursor of
> just the rows I want?
>
> Thanks!

You can't delete rows from a cursor.

This is just a wild guess on my part ... but I think the issue you are addressing may just have something to do with using a WHERE clause on your cursor's SELECT statement to only fetch the rows you want in the first place.

Daniel Morgan Received on Tue Jul 02 2002 - 11:02:16 CDT

Original text of this message

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