Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selecting a result based on latest date

Status
Not open for further replies.

shefea

Programmer
Jun 20, 2001
9
CH
Hi,
I could use some help, please.
I have a table with
Emp_name,
Certif_date,
work_loc columns.
I want to select the emp_name,work_loc and the latest (most
recent) certif_date.
some emp_names have multiple certif_dates and I want to latest one.

I am familian with if begin and case statements a bit, but I cannot figure out how to compare the dates.

Please help, thanks in advance.
shefea
 
select emp_name,work_loc,max(certif_date) from t
group by emp_name,work_loc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top