Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Remove rows from a cursor?
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