DB Wizard

  • Thread starter Thread starter Simon Ransom
  • Start date Start date
S

Simon Ransom

** Remove the simple_ to reply to me directly **

Here's a challenge for you wizards out there...

I would like to reflect the 2nd record from a query on my
asp page. I know how to get the 1st record only (show 1
record only) but doe anyone know how/if i can show only
the 2nd record?

Every question (which is few) that I have posted here has
always been answered so my thanks go to ALL that input
here. If you have an DRW question, you have to check out
www.outfront.net a site i was referred to recently, it is
awesome!

Many thanks

Simon
 
Try using Top 2, and Order By <fieldname> Desc "

"Select Top 2 from table Order by fieldname Desc"

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Actually, now that I think about it, you could use a subquery:

SELECT TOP 1 (*) FROM
(SELECT TOP 2 (*) FROM MyTable ORDER BY SomeField)
ORDER BY SomeField DESC

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Neither a follower nor a lender be.
 
Back
Top