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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting maximum from a list

Status
Not open for further replies.

hpl2001

Programmer
Dec 18, 2001
105
CA
Hi:

In the Where section of a Select statement I want to use a statement that tests if a date is less than the maximum of a group of dates...so in plain language it would be:

Where
DateA is less than the maximum of (DateB, DateC, DateD)

Can this be done?

TIA

Holly
 

1.
[tt][blue]SELECT MAX(DateField) From MyTable[/blue][/tt]

2.
[tt]SELECT WhatEver From SomeTable
Where
DateA < ([blue]SELECT MAX(DateField) From MyTable[/blue])[/tt]

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top