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!

Concatenate columns with distinct values in oracle

TrojanSpiritAug 6 2013 — edited Aug 7 2013

Hello Gurus,

My table structre look like follwoing:

TankListUS    TankListCanada     TankListIndia

----------           --------------              -------------

T111||T222       T444||T222            T555

Now when I run the query:

select (TL.TankListUS || '||'  || TL.TankListCanada || '||'  || TL.TankListIndia)as "OverallSummary" from TankListTL

I get output as

T111||T222||T444||T222||T555

But I don't need duplicate of tanks. I need my output as:

T111||T222||T444||T555

Is this possible?

This post has been answered by Mohan1312 on Aug 7 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2013
Added on Aug 6 2013
7 comments
2,228 views