Re: Top N without inline

  • From: Dave Pacia <davepacia@xxxxxxxxx>
  • To: oracle-l-freelists <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 23 Jun 2010 10:07:11 -0700 (PDT)

Thanks for the responses.  Checking out subquery factoring/common table 
expressions in Hyperion (now part of Oracle Enterprise Performance Management 
System), we found that the tool has a setting that will display the Top N 
results--it just throws away rows >N.  That actually seems like the best option 
for us given that the number of records isn't that great.

Thanks again,
Dave




________________________________
From: Niall Litchfield <niall.litchfield@xxxxxxxxx>
To: knecht.stefan@xxxxxxxxx
Cc: Dave Pacia <davepacia@xxxxxxxxx>; oracle-l-freelists 
<oracle-l@xxxxxxxxxxxxx>
Sent: Wed, June 23, 2010 12:55:52 PM
Subject: Re: Top N without inline


Or common table expressions in the std. It may well be worth searching for that 
I'm the tool docs, since a tool that doesn't accept subqueries is unlikely to 
accept a CTE
Niall Litchfield
On Jun 23, 2010 5:49 PM, "Stefan Knecht" <knecht.stefan@xxxxxxxxx> wrote:
>
>You're welcome.
>
>
>It's called subquery factoring, and it's hidden somewhere in the depths of the 
>100's of pages the SELECT reference for Oracle spans :-)
>
>
>Good luck
>
>Stefan
>
>
>
>
>=========================
>
>Stefan P Knecht
>CEO & Founder
>s@xxxxxxxx >
>10046 Consulting GmbH
>Schwarzac...
>On Wed, Jun 23, 2010 at 6:27 PM, Dave Pacia <davepacia@xxxxxxxxx> wrote:
>
>>>
>>
>>Thanks Stefan.  That is syntax I had not seen before--didn't know you could 
>>do that.  I've given it to the developer - let's see what he says.
>>
>>Dave Pacia
>>
>>
>>
>>>>
>>
________________________________
From: Stefan Knecht <knecht.stefan@xxxxxxxxx>
>>To: davepacia@xxxxxxxxx
>>Sent: Wed, June 23, 2010 12:05:50 PM
>>Subject: Re: Top N without inline
>>
>>>
>>> This might do the trick:
>>>
>>> WITH myview as
>>>        (SELECT pal_attained_mtd, DENSE_RANK () OVE...
>>
>


      

Other related posts: