0

I have tables that have person aliases and could be one person has many aliases. I want to display the aliases on row separate by a comma

For example:

Name Alias Name
John JohnA
John JohnX

I need them like

Name Alias Name
John JohnA, JohnX
Obaidi
  • 1
  • 3
  • You need a string concatenation aggregation function. Please tag the specific DBMS you are using. – cornuz Sep 22 '21 at 15:40
  • You would use `group by` and the string aggregation function appropriate to your (unspecified) database. – Gordon Linoff Sep 22 '21 at 15:40
  • https://stackoverflow.com/questions/273238/how-to-use-group-by-to-concatenate-strings-in-sql-server – Arsen Mkrtchyan Sep 22 '21 at 15:41
  • Does this answer your question? [How to use GROUP BY to concatenate strings in SQL Server?](https://stackoverflow.com/questions/273238/how-to-use-group-by-to-concatenate-strings-in-sql-server) – Arsen Mkrtchyan Sep 22 '21 at 15:42

0 Answers0