0

I am looking for a sql statement that aggregates (concatenates) a text value based on another text value. I’m working in ms access. Here is an example of the table source.

ChangeNumber     Approver
123              Hey
123              You

I’ve tried group by statements which worked if I wanted to return a count. Example

select changenumber, count(approver)
From Changeapprover
Group by changenumber

However I cannot sum this field because it is text.

Result should be

ChangeNumber     Approver
123              Hey, You

This information exists originally in the same table. Column 1 contains duplicates. The resulting column 2 should concat the values of the original column 2 if the value for column 1 is identical.

  • 3
    Possible duplicate of [Combine values from related rows into a single concatenated string value](https://stackoverflow.com/questions/13278590/combine-values-from-related-rows-into-a-single-concatenated-string-value) – Barry Piccinni May 22 '19 at 16:58
  • Using Access, I would most likely try to write a function to do this for me. Take a look at this: https://stackoverflow.com/questions/92698/combine-rows-concatenate-rows – Barry Piccinni May 22 '19 at 17:00

0 Answers0