finding ordinal position in a result set?

From: <mh_at_pixar.com>
Date: 22 Jul 2009 10:11:04 GMT
Message-ID: <4a66e5b8$0$7663$336e962_at_news.usenetserver.com>



Suppose I have a query like the following. What's the best way to find the position of a particular item? e.g. I would like to find out that:

      'fred' is position 3 of 4 total.

select seq,name from tbl order by seq;
seq name
--- ----
  2 bob
  5 able
  8 fred
  9 steve

Many TIA!
Mark

-- 
Mark Harrison
Pixar Animation Studios
Received on Wed Jul 22 2009 - 05:11:04 CDT

Original text of this message