• This gives the exact same results.  Why doesn't DENSE_RANK work?

    ; WITH [a] AS
    (
    SELECT 9990 [col1] UNION ALL
    SELECT 9990 UNION ALL
    SELECT 9995 UNION ALL
    SELECT 9995 UNION ALL
    SELECT 9999
    )
    SELECT [col1],
    row = DENSE_RANK() OVER (ORDER BY [col1])
    FROM [a]

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA