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 -> Newbie SQL question

Newbie SQL question

From: Existence <mrochon_at_bigfoot.com>
Date: Thu, 13 Sep 2001 01:14:39 GMT
Message-ID: <3MTn7.74344$KE4.8299462@carnaval.risq.qc.ca>


Hello SQL gurus,

I need to do a simple (it sure look simple) query in SQL on a table with no primary key but I'm having some little difficulties.

Basically, I have 3 columns named ID, START_DATE and EMP_AF. Based on ID which is not unique, I need to extract the value of column EMP_AF which has the most recent START_DATE for ID.

For example, if ID has 5 records with identical values, I need to check each one in the START_DATE column, get the most recent date and then get to the corresponding value in EMP_AF for this record.

I believe I'm very close to a solution but my head is about to explode so I need help.

Thanks.

Michel R. Received on Wed Sep 12 2001 - 20:14:39 CDT

Original text of this message

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