• skcadavre (7/14/2010)


    Lowell (7/14/2010)


    turning the related rows into a comma delimited list is what you are after right?

    the easiest way is to use a neat trick using FOR XML.

    here's a nice example I keep handy in my snippets that i think is very intuitive.

    Cool, haven't come across this before. Much easier than the CTE I went with.

    now that's funny, we both like each others examples.... i just added your example into my snippets so i have more than one way to skin that cat. Thanks!

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!