Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Newbie SQL question
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
![]() |
![]() |