• Alan.B (6/25/2013)


    Which is why I included two solutions: My original solution which I believe is correct and one which was cleaner and faster than the one Michael posted.

    Do you not test before making performance claims?

    Michael Valentine Jones

    SQL Server Execution Times:

    CPU time = 265 ms, elapsed time = 117 ms.

    Alan.B

    SQL Server Execution Times:

    CPU time = 812 ms, elapsed time = 269 ms.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]