Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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

843805
Hi,
read this discussion and you will find why not doing such a thing you want to.
http://groups.google.com/group/comp.lang.java.gui/browse_thread/thread/a73288f8bb3aaeb8/ea68f78f81a7573b%23ea68f78f81a7573b?sa=X&oi=groupsr&start=0&num=3

L.P.
843805
Show us any UI which does something like that...

Use a JList instead.
1 - 2
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,331 views