• As Crispin mentioned, be careful with the set methods when working with large tables, as the performance can degrade remarkably. Also, unless you want "golf tournament" ranking, you will need to include a unique key in the predicate for breaking ties. If this must be done on the server with large tables, it can be faster (as the MS article mentions in passing) to use a temporary table with a "rank" column assigned the identity property.

    Personally, I think this sort of thing should be done at a higher tier: return just the ordered result set from SQL Server and use the application language to create the rank numbers.

    --Jonathan



    --Jonathan