Custom aggregate functions

  • Hello,

    I need an aggregate function that concatenate string values on a column.

    The msdn example here (the first one) does exactly what I need.

    My questions are:

    What is the order of the rows the strings concatenates?

    How can I make sure the order of the strings being concatenated is the one I need?

    for example I need the concatenated strings to be ordered by a date column

    Thank you,


  • You're going to want to use the FOR XML method, just without a delimited separator.

    Check out this article:

    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply