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!

How do i display multiple rows as One Row by Eliminating Duplicates among them

1651695May 16 2014 — edited May 16 2014

How do I display multiple rows data as one Row? And also eliminate any duplicates among them..

For Example

Column1              Column2

A0                       JAN, FEB, MAR, SEP

B0                       JAN, FEB

C0                       JUN, JUL, AUG, SEP, OCT, NOV, DEC

My Output should be

COLUMN2

JAN,FEB,MAR,SEP,JUN,JUL,AUG,OCT,NOV,DEC

Comments

DecaXD
HI,

change your varchar2( X BYTE) to varchar2(X CHAR). This is a characterset issue.

Let us know
zoran_2000
Hello,

if you click on the A column in the target pane, you see the mapping implementation in the Property Inspector.
For example TABLE.A change this in RTRIM(TABLE.A,' ')
Rtrim delete extra blank space .
you can use others SQL function.

Let us know
SVAR
Hi,

Thanks for that.It works if i change it to NVARCHAR2,The only thing is, if target database team in case if they are not willing to change the data type, it it anyway can i do this nvarchar2 to varchar2 conversion?
i.e i can load it into temp table which will have NVARCHAR2 Type and then anyway can it conver it to VARCHAR2 when i load using ODI?

I do not not want to Apply TRIM because if we reach max lenth we will fail when the text strings get closer to the 100 Byte(current length of the column) limit in this case.

Any ideas of converting from NVARCHAR2 TO VARCHAR2?

Cheers
DecaXD
Hi,

here a description

2523159

the issue is due that some char occupy more bytes than another. If you are not working on a Worldwide application usually is sufficient to set a correct charset in your loading procedure.
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 13 2014
Added on May 16 2014
9 comments
3,406 views