• youresoshain (2/8/2014)


    Thanks guys. We're a little bit closer.

    So I tried your query. It worked in that it produced the comma delimited list, which is great.

    The 2nd part of it is this:

    Your query returns both records, each with the comma delimited list.

    What I need is where the carbon_copy_id is not null, it only returns one of the two. Where it is null, it only returns one record.

    so for eg, the resultset of your query produced

    messageid carboncopyid memberlist

    175241638678, 25256

    175241538678, 25256

    i would need this to be one record with the memberlist where carbon copy was not null, one record without it where it is null.

    For the below:

    so for eg, the resultset of your query produced

    messageid carboncopyid memberlist

    175241638678, 25256

    175241538678, 25256

    Why would one row have a list of member id's and the other be null when the message id's are different? Is the duplication a result of the same carbon copy id's?