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

Home -> Community -> Usenet -> c.d.o.tools -> subquery to find all rows active on the max date that is active

subquery to find all rows active on the max date that is active

From: <crunchy2k_at_my-deja.com>
Date: Mon, 18 Dec 2000 21:12:00 GMT
Message-ID: <91luip$bgc$1@nnrp1.deja.com>

I am re-submitting my question, because I left off 'effdt' (see the ** line).

I have a table with fields of

         SSN
         record_num (1, 2, etc.)
         effdt
         status ('active', 'inactive')
         ... and other fields

Conceptually, I know that each SSN has a maximum effdt with status = active, when I look across all of its record_num's.

Can someone give me a SQL query for this? I am guessing it entails a subquery within another subquery.

Thanks.

Sent via Deja.com
http://www.deja.com/ Received on Mon Dec 18 2000 - 15:12:00 CST

Original text of this message

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