Top "Listagg" questions

The LISTAGG analytic function was introduced in Oracle 11g Release 2, making it very easy to aggregate strings.

LISTAGG in Oracle to return distinct values

I am trying to use the LISTAGG function in Oracle. I would like to get only the distinct values for …

sql oracle aggregate-functions listagg
Oracle - ORA-01489: result of string concatenation is too long

Created one view within which one field(of 6) is a concatenation of two fields from the source table. Created a …

sql oracle oracle11g size listagg
What's the equivalent for LISTAGG (Oracle database) in PostgreSQL?

I have to replace the Oracle driver with the newest PostgreSQL. PostgreSQL doesn't know the function LISTAGG. I have to …

sql postgresql string-aggregation listagg
Convert WM_CONCAT to Listagg

My DBA is upgrading my oracle db from v10 to v12. I have some old SP's that uses wm_concat …

sql oracle listagg wm-concat
What does LISTAGG with ORDER BY NULL actually use as the order criteria?

If I do SELECT LISTAGG( COLUMN_VALUE ) WITHIN GROUP ( ORDER BY NULL ) AS OrderByNULL, LISTAGG( COLUMN_VALUE ) WITHIN GROUP ( ORDER …

oracle sql-order-by listagg
Convert LISTAGG to XMLAGG Oracle

I have a below SQL and I am trying to convert the LISTAGG to XMLAGG. My DB version is 12.1 and …

sql oracle listagg string-aggregation
How to Use COLLECT with VARCHAR2 Oracle 10g

I'm trying to get the COLLECT function to work for me. I'm using 10g and therefore found that LISTAGG and …

sql oracle10g collect listagg
Remove duplicate values from comma separated string in Oracle

I need your help with the regexp_replace function. I have a table which has a column for concatenated string …

sql oracle listagg
How to insert SELECT LISTAGG values to varchar variable

I am writing an Oracle user defined function. How can I insert listtagg values Pears, Oranges, Bananas, Apples into a …

oracle plsql oracle11g sql-function listagg
Oracle Listagg Sub query

SELECT e.pem_id AS id, e.pem_subject AS subject, e.pem_content AS content, e.pem_sent_date …

sql oracle listagg