Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> All rows with a value less than max?

All rows with a value less than max?

From: Collier,Joshua W - JDD-6 <jwcollier_at_bpa.gov>
Date: Tue, 22 Aug 2006 13:32:41 -0700
Message-ID: <30F781DDC90262409272DD755F0BBEA0F317F0@EXHQVSB.bud.bpa.gov>


Hi,

Stumped on this. I'm sure the answer is simple and elegant, just can't get my mind to stretch it.

I need to retrieve all rows that have a value for time that is less than the max time. Is there a way to do this without a subquery?

select snap_id,snap_time from $stats where database_name = 'donkey' and snap_time < (select max(snap_time) from $stats) ;

Thanks,

Josh C.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Aug 22 2006 - 15:32:41 CDT

Original text of this message

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