Hi experts,
I have a field with data as shown below
WITH T AS
(SELECT 'TEXT1|| TEXT1|| TEXT2|| TEXT2|| TEXT1|| TEXT2|| TEXT3' TEST FROM DUAL)
SELECT * FROM T;
As you can see there are duplicate string with double pipe delimiter (||). I want to remove the Duplicates and instead of
TEXT1|| TEXT1|| TEXT2|| TEXT2|| TEXT1|| TEXT2|| TEXT3
I want to see
TEXT1|| TEXT2|| TEXT3
How can i achieve this using regexp?
I do not want to create a function or write complex heircharchical sqls so i am opting for regexp.
Thanks in advance.