| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A better soln anyone?
Bliss wrote:
> 
> Hi all,
> 
> I have this table which will be containing about 1,00,000 records and will
> grow.  The data is some what as follows
> 
> ID  ITEM        PRODUCT    NEXT ORDER DATE
> 1    ITEM-01  P1
> 2    ITEM-02  P2
> 3    ITEM-01  P3
> 4    ITEM-03  P4
> 5    ITEM-01  P5
> 6    ITEM-01  P6
> 5    ITEM-04  P1
> 
> I need to process records from this table serially to find the next order
> date... When I process ITEM-01, I need to check the next order date for
> which product of ITEM-01 is earliest and show this up on the screen.  My
> problem is that when I process the records serially (using a cursor), all
> records of ITEM-01 are going to be processed 4 times (in this case).  Any
> way I can avoid this?  Am I missing out on some Oracle provided syntax or
> anything which will allow me check / eliminate proceed records? I'm trying
> to avoid using another flag and set it before I start processing as this
> table's going to be massive and the rollback segment may not extend....
> 
> Any suggestions are greatly appreciated....
> 
> Regards,
> Bliss
Have you considered functions like MAX() and MIN()? Received on Wed Oct 24 2001 - 00:51:18 CDT
![]()  | 
![]()  |