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 -> Re: Is this possible

Re: Is this possible

From: Bill <Norwester656_at_hotmail.com>
Date: 11 Mar 2003 16:16:42 -0800
Message-ID: <5f6e1e81.0303111616.12c10947@posting.google.com>


> > 6 2 Recieved
> assuming your INSERT below is correct this one is 6 3 Received
> Right?

 Correct, I made a typo in the example, but the insert statement is correct. Item 6 should be of class 3.  

> I think you are making it more complicated than it needs to be.
> have you tried something like
>
> Select class_id, min(doc_num) Itemlo, max(doc_num) itemhi, status
> from doctest
> group by class_id, status
> order by class_id;

Yes, I've tried this simple approach. Problem is that when you use the Min, Max feature it doesn't seperate the series into groups... so you get.

Class itemlo itemhi status

2          3          10   Recieved   <<<<<this is the problem
2          1           2   Voided

and so on...

But if you look at the data, only items 3-5 and 10 have been recieved in class 2, not items 3 through 10. What I want it a listing that gives 3-5 for class 2 and then makes another line for item 10 (or if there was another series range it would start a new line... say 10-15 for example).

Thanks for responding though!

-Bill Received on Tue Mar 11 2003 - 18:16:42 CST

Original text of this message

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