Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
quad4x
Contributor II
Contributor II

Using REGEXP_REPLACE in my query

- Talend Open Studio for Big Data 6.5.1

 

I have a query pulling data and one of the columns is a list of remedy tickets.  In my query, I'm using a regex to remove duplicates returned by the listagg.

 

select distinct rt.change_request_name,rt.change_request_number,rt.user_id,rt.full_name,
rt.termination_date,
RTRIM (
REGEXP_REPLACE (
(listagg(ica.ticket_number,',
') within group (ORDER BY ica.ticket_number) over (partition by ica.change_request_id)),
'([^,]*)(,\1)+($|,)',
'\1\3'),',')
as Remedy_Ticket from remedy_ticket rt

 

When I run my query in SQL Developer the results return as expected with the duplicates removed.

 

When it is part of my job, the results still contain the duplicates.  

 

Labels (2)
1 Reply
manodwhb
Champion II
Champion II

@quad4x , create a metadata for that db in repository and when you try to run this query against to this is it showing duplicates?