Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Select grouping ranges of records
lsouzaf wrote:
> I´m designing a new report and I have a query that returns something like :
>
> 1,2,3,4,5,9,10,11,15,16,17,20,24,25.
>
> I need to print this result like this:
>
> From 1 to 5
> From 9 to 11
> From 15 to 17
> 20
> From 24 to 25
>
> Does anyone have an idea of how can this be done ?
We do not do homework but we will provide hints. So here's yours:
There is a function, similar in usage to DECODE, that works with ranges. Where were you when it was discussed in class? You can find it if you go to http://tahiti.oracle.com and search for DECODE and then in the same on-line book put in some effort.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sat Nov 29 2003 - 10:23:28 CST