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!

Need help on choosing the least date

Status
Not open for further replies.

TonyScarpelli

Programmer
Jan 23, 2003
361
US
I have two tables, one with equipment information with an ID, and one with dated procedures in it related to the ID of the other table.

There are multiple rows (2 to 4) for an ID, and with a date field.

I need to choose one of the rows based on the earliest date.

I.E.
ID Date
1234 2009/08/01
1234 2008/07/27 <-- I need to choose this row
1234 2019/03/22

Any ideas on how I can do this?

Thanks


Tony Scarpelli
Clinical Engineering Dept.
Maine Medical Center
Portland, Maine 04102
 
Code:
SELECT [ID], MIN([Date]) FROM TableA

--------------------------------------------------
"...and did we give up when the Germans bombed Pearl Harbor? NO!"

"Don't stop him. He's roll'n."
--------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top