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!

Select first 3 unique columns

3376938Jan 9 2017 — edited Jan 10 2017

Hello.

I have the below sample data and I am trying to extract the 1st three unique values.  Is there an easy way to do this (Note I have up to 9 phone numbers, but only am listing 5 in the below table)

So I need my output to be:

ID          Phone1          Phone2     Phone 3

1          4028130006

2          4026155699     4022394622

3          4023181498     4022394622

4          4028129001     4025059175     4028130006

IDPhone1Phone2Phone 3Phone 4Phone 5
140281300064028130006402813000640281300064028130006
240261556994022394622
340231814984023181498402318149840223946224022394622
4402812900140250591754028130006
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 7 2017
Added on Jan 9 2017
18 comments
1,692 views