Top "String-aggregation" questions

This tag is intended for SQL questions where multiple string (character) values should be aggregated into a single value using GROUP BY.

Oracle: Combine multiple results in a subquery into a single comma-separated value

I'm trying to convert a single-columned subquery into a command-separated VARCHAR-typed list of values. This is identical to this question, …

sql oracle subquery string-aggregation
Get unique values using STRING_AGG in SQL Server

The following query returns the results shown below: SELECT ProjectID, newID.value FROM [dbo].[Data] WITH(NOLOCK) CROSS APPLY STRING_…

sql sql-server sql-server-2017 string-aggregation
Produce DISTINCT values in STRING_AGG

I'm using the STRING_AGG function in SQL Server 2017. I'd like to create the same effect as COUNT(DISTINCT <…

sql sql-server distinct sql-server-2017 string-aggregation
Why does the wm_concat not work here?

I have this query : (SELECT OBJECT_ID from cr_object_group_entries_vw where object_group_id IN (SELECT ITEM …

sql oracle oracle11g string-aggregation wm-concat
'stuff' and 'for xml path('')' from SQL Server in Postgresql

I'm migrating some SQL Server 2008R2 queries to Postgresql 9.0 and I have some trouble with it. Here's the SQL Server …

sql postgresql string-aggregation
comma-separated list as a result of select statement in Oracle

I have a table named "person". It contains person's id and it's parent id (only one parent is possible). As …

sql oracle subquery string-aggregation
Oracle concatenation of columns with comma

Possible Duplicate: How can I combine multiple rows into a comma-delimited list in Oracle? Could some one please tell me …

sql database oracle concatenation string-aggregation
string_agg for sql server pre 2017

Can anyone help me make this query work for sql server 2014. This is working on Postgresql and probably on sql …

sql sql-server string-aggregation string-agg
String_agg in sql server 2016

Here is my code in sql server 2016 insert into @entdef_queries(entitydefid,squery) select A.entitydefid , ( select String_agg(cols,…

sql sql-server sql-server-2016 string-aggregation