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!

eliminate duplicates in row

prooraJun 23 2014 — edited Jun 24 2014

Dears ,

assumed i have the below table ,

WITH H_DATA AS (

SELECT 1 "A",4 "B",2 "C",1 "D",5 "E",4 "F"  FROM DUAL

UNION

SELECT 3 "A",7 "B",5 "C",3 "D",66 "E",NULL "F" FROM DUAL

UNION

SELECT 3 "A",7 "B",3 "C",NULL "D",NULL "E",NULL "F" FROM DUAL)

SELECT * FROM H_DATA

OUT PUT

A B C D E F

1 4 2 1 5 4

3 7 3

3 7 5 3 66

i would like my output to eliminate the duplicates  as below

Header 1Header 2Header 3Header 4Header 5Header 6
1245
37
35766

OR  order by row

Header 1Header 2Header 3Header 4Header 5Header 6
112445
337
335766

is there possible way to do that?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2014
Added on Jun 23 2014
8 comments
3,139 views