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: Complex Query

Re: Complex Query

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 08 Jul 2002 16:12:10 GMT
Message-ID: <3D29B9AD.8FD80C93@exesolutions.com>


Yanick Hudon wrote:

> Hi to all
>
> I need some helps to perform a query based on cross-table links.
>
> - I have 9 levels of average whose are different name in a table;
> - I have also all the people whose can subscribe to an event;
> - I have another table which determine members based if a level is
> present or not;
> - ! have a table which defines the score for all the participants to the
> eventID;
>
> Now here's the query i need:
>
> I need a ranking query based on the levels of the members order by Score
> Ascending with some particularities:
>
> --> The first two levels have to be together for the 10 first position,
> after that i take only the first level;
> If i have a member in those 2 levels which is 50 years old and
> more, i shall include him;
>
> --> The same rule applies to levels 7 and 8;
>
> --> All the others levels, If i have a member in those which is 50 years
> old and more, i shall include him;
>
> --> And finally for all the others levels, they're stand alone.
>
> My first attempt to the query perform what i want except that after the
> 10 first position in level 1 and 7,
> the members whose are in the level after are still the level 1 and 7,
> because i'm treating them as level 1 and
> 7 in another table that i create where it's saying that a member can
> participate in 2 or more level. I Change
> the levels after inserting the record with a Union Query between level 1
> and 2, also i did the same thing
> with level 7 and 8.
>
> Is there a way to perform what i want without the last table i created??
>
> Any helps would be appreciated
>
> Thanks in advance.

From your description I can not understand enough of the structure to help you.

But from what little I can understand ... my suggestion would be to look at CONNECT BY Daniel Morgan Received on Mon Jul 08 2002 - 11:12:10 CDT

Original text of this message

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