• Lynn Pettis (4/4/2009)


    First, I was slightly confused, as the code Lowell posted uses a CTE and this is in a SQL Server 7, 2000 forum.

    My bad. I am using SQL 2005 and I posted the question in the wrong forum. The code provided by Lowell worked fine. Lynn, I will try your suggestion later today. Thank you both.