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!
>
Select from inline view's and analytic function can do the job. Depends on your verion (did you say?)
/Svend Received on Tue Jul 02 2002 - 13:37:16 CDT