Okies you SQL gurus out there :-)

I have a table called Employee Info.

It contains Employee ID, Department ID, and Effective Date as well as other
things.

ANyways, I am allowing the user to select a list of employees by Department
Date, from this table.

However, I only want to return ONE record PER Employee ID, and that record
must be the most RECENT according to the Effective Date.
So..if I have.

1111    Bond,James     11001     01/01/2000    5dzb1
1111     Bond,James    11001    03/07/2000    9tyu6
1111    Nibble,Neeby   11001    01/06/2000     9iogj
1002    Joans,Avery     12001    01/01/1999    0iuyt

The system should only return :

1111    Bond,James        11001    03/07/2000    5dzb1
1111    Nibble,Neeby     11001    01/06/2000    9iogj

If the user does a search by department for department number 11001.

I am hoping that someone is able to tell me how to do this very quickly, and
that its quite easy to do :-)
Thanks!
ciao!
*waves merrily*

-Gel

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to