My query is listing out comments in sequence lines. I am hoping to combine them into one comment column instead of having multiple rows for one PO. Here is my query now:
SELECT PO,
SEQUENCE_NUMBER,
COMMENT_LINE
FROM Database
Which is returning:
PO | SEQUENCE NUMBER | COMMENT LINE |
---|---|---|
8582959 | 1 | COMMENT LINE 1 |
8582959 | 2 | COMMENT LINE 2 |
8582960 | 1 | COMMENT LINE 1 |
I am hoping for it to return the two comment lines concatenated with a ', ' between them like this:
PO | COMMENT LINE |
---|---|
8582959 | COMMENT LINE 1, COMMENT LINE 2 |
8582960 | COMMENT LINE 1 |
I tried using CONCAT, but couldn't figure out how to get the lines to join since they are in the same columns. I think maybe an inner join would work, but I have never used one and am not quite sure on how to format. Thanks so much for the help.