finding ordinal position in a result set?

From: <>
Date: 22 Jul 2009 10:11:04 GMT
Message-ID: <4a66e5b8$0$7663$>

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 Harrison
Pixar Animation Studios
Received on Wed Jul 22 2009 - 05:11:04 CDT

Original text of this message