I have what I thought at first was a simple concat issue and went to use STUFF and found my self running into a knowledge limitation as the multiple rows are coming from a join.
Most of the examples I was reading didn't have any filtering or somehow I missed how to implement it correctly.
I looked at this for example.
I'm strugling to figure out how I would get the effect of the join using a method such as the above SO post.
My query with multiple rows:
SELECT
[INC].[IN_ID],
[INC].[SUBJ_LINE],
[REL].[PEOPLE_ID],
[ISA].[ISSUE_AREA_ID],
'######' AS 'SEPERATOR',
REL.*
FROM
INCOMING INC
JOIN RELATION REL ON
REL.IN_ID = INC.IN_ID
JOIN [IN_ISSUE_AREA] ISA ON
ISA.IN_ID = INC.IN_ID
WHERE
INC.METHOD = 'imail'
AND [INC].[TO_ADDRESS] IS NOT NULL
AND [INC].[IN_ID] = 5421121
The Results:
IN_ID | SUBJ_LINE | PEOPLE_ID | ISSUE_AREA_ID | SEPERATOR | .....
542 SubjA 72 IssueA ######
542 SubjA 72 IssueJ ######
What I would like to see is:
IN_ID | SUBJ_LINE | PEOPLE_ID | ISSUE_AREA_ID | SEPERATOR | .....
542 SubjA 72 IssueA, IssueJ ######
Thank You