Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nic
Posting Yak Master
209 Posts |
Posted - 2002-06-19 : 14:00:51
|
| Hi,Is there an easy way to get the second maximum record from a table? For example a table has a date column. I don't want the maximum date, I want to get the previous maximum date. Any ideas?date record1/1/20011/2/20011/3/20011/4/2001I want to get the "1/3/2001" recordThanksNic |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-06-19 : 14:07:57
|
| SELECT Max([date]) FROM myTableWHERE [date]<(SELECT Max([date]) FROM myTable)I would recommend that you change the name of the date column to something other than "date", because it's a reserved word and will cause you problems. |
 |
|
|
|
|
|