Skip to Main Content

SQL & PL/SQL

Is it possible to do this using a Regular expression

Keith JamiesonOct 2 2007 — edited Oct 4 2007
Sample Data

Oracle 10.2.1

WITH BARCODE AS
(SELECT '1234|5678|1234|679134|1235|1234|679134|5678|1234|'
FROM DUAL)
SELECT * FROM BARCODE

I have some data as above. The '|' is a field separator and all the data is in one column. I need to get rid of the duplicates and was wondering if it was possible to do this with a regular expression. The above is sample which probably represents the worst situation I am likely to come across.
I can do this in PL/SQL but would like a SQL solution if possible.
I have a table which has data like this so what I'm really after is updating it
getting rid of any duplicate.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2007
Added on Oct 2 2007
12 comments
1,148 views