• This will still work in SQL 2005, not in 2000 as I've used FOR XML.

    I should probably check the dates a little better next time though, I only looked at it because it was in yesterdays SQLServerCentral email as the featured script. I assumed only new scripts were featured, and we all know what happens when you assume.....!