• John, if all you want is year, month, and sal, would this not work for you?

    SELECT MIN(year) as [year], MIN(month) as [month], sal

    FROM YourTable

    GROUP BY sal

    ORDER BY sal



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]