James Holmes wrote: > There is no select top n in Oracle. > > A subquery is necessary: > > Select * FROM > (SELECT stuff FROM aTable ORDER BY query_seq desc) > WHERE rownum < n I was afraid of that... That is a huge dataset in that sub select. I mean really 10's of millions of records just to get the top 25.
Oh well, at least it is only debugging|testing information and does not need to be high proformance for production purposes. I'll take a look at the Row_number() thing, that is new to me. P.S. Sure shows how many developers don't need to work with Oracles eccentricities. For all you SQL server types, Oracle unfortunately does not understand the TOP command. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320452 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4