• ok... i loved the for XML path.

    The stuff it's kind of cute, but i didn't understand TYPE... and the ./text thing... I have to study more.

    Where can I learn more about this stuff?

    I only have the 2778 MS Quering SQL server 2005 lessons's in the bag, and a little experience.

    Thanks

    Well, there's a fantastic website called SQL Server Central which I learned a lot from, and continue to do so!

    Most programmers who come from the usual programming languages have a hard time using tsql in the best manner. Declarative programming requires a completely different mindset to solving problems. My general rule of thumb is that if you have to use a loop or a cursor then you're doing it the wrong way 😀