Questions tagged [listagg]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
62 views

How to use PIVOT or LISTAGG to solve this?

I have a table like below. USERID USERNAME ITEM 12345 JESSE ITEM1 12345 JESSE ITEM3 12345 DON ITEM2 12346 DANNY ITEM4 12346 ELISA ITEM1 12347 ANDY ITEM2 12347 ANDY ITEM4 What im trying to ...
3
votes
4answers
59 views

Concatenating only desirable values with LISTAGG

In the Oracle DB there is a table with data "YEARS", see a table/image below +-----+-----------+------------------+ | FID | I0 | BJA | +-----+-----------+-----------------...
0
votes
1answer
1k views

Using 'Listagg' function and 'Regular Expression' to REVERSE the value of a specific column in Oracle

I have a table with below structure: create table TBL_TEST ( col_id NUMBER, col_name VARCHAR2(500) ) Some example data : col_id | col_name ----------------- 1 | aetnap 2 | ...
3
votes
0answers
111 views

Better ways to remove duplicate values of columns when using pl-sql "listagg" function in oracle

I have a table as you can see below : c_id | Name1 | Name2 | Name3 -------------------------------- 1 | a | b | c 1 | c | d | a 2 | d | e | a 2 |...
0
votes
0answers
673 views

Remove/distinct duplicates on listagg - oracle

I'm using the oracle-xe 11g version and I have the below sql code that I aggregation the course code, but the output has duplicates. SELECT b.alu_cpf AS login, b.alu_nomeco ...
0
votes
0answers
801 views

Removing Duplicates in LISTAGG

In the query below, I used the LISTAGG function to aggregate certificate names I.e. JPM_DESCR90 . However , now I'm trying to find a way to remove all the duplications in the row, and reducing the ...
3
votes
3answers
2k views

De-Duplicate from LISTAGG

I am using 11.2 version of oracle. I want to de-duplicate from LISTAGG. below is existing data in oracle db: Speaker | Qualification | Product P A P1 P B ...
1
vote
1answer
252 views

listagg in order and including a sequence of separator when missing any row of a sequence

Sorry for the long title but it's a little bit difficult to explain. We have a table | N rows | Atrib1 | Atrib2 | Atrib3 | Atrib4 | Final row | --------------------------------------------------...
2
votes
0answers
4k views

"result of string concatenation is too long"

I have a query which uses listagg it is as follows SELECT listagg(path1.PATHWAY_ID,'|like||id|')within GROUP ( ORDER BY path1.PATHWAY_ID), listagg(path1.PATHWAY_NAME,'|like||name|') within GROUP ( ...
0
votes
1answer
367 views

Concatenate Data from different row from same table

This is SQL source Table. I need to concatenate this table like the table below,appreciate your help. PE_CASE PE_ITEM PE_HIS_SEQ PE_COMMENT 200 0001 9989 Comment 1 200 ...