We've expanded our news coverage and improved our search! Visit news.oreilly.com for the latest or search for all things across O'Reilly!
advertisement

Article:
  SQL Subqueries
Subject:   i want a previous value of the max value
Date:   2005-03-29 03:41:22
From:   Ansu
Response to: i want a previous value of the max value

select * from Table1 A
where (n-1) =(select count(*) from Table1 b
where a.[fieldname] < b.[fieldname])