Skip to Main Content

Analytics Software

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.

How To get Distinct Records using ListAgg function in OBIEE Report ?

Rohit_LNov 24 2015 — edited Dec 4 2015

Hello All,

I am getting correct result like mention below. But I don't want to see duplicates in my result Here in my example I am getting duplicate record for Employee Name 'Pat'. So How to get Distinct values using LISTAGG function ?

Sample data set with department and its employees

Department      Employee

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

Marketing       Michael

Marketing       Pat

Marketing      Pat

Marketing     Pat

Purchasing      Den

Purchasing      Alexander

Purchasing      Shelli

Purchasing      Sigal

Purchasing      Guy

Purchasing      Karen

Using ListAgg function we can convert this into :

Department      Employees

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

Marketing       Pat,Pat,Pat,Michael

Purchasing      Sigal,Shelli,Karen,Guy,Den,Alexander

I tried lots of things but I am not able to figure out how exactly this can be achieved, If anyone have any idea or suggestions please share, thanks in advance.

This post has been answered by Rohit_L on Dec 4 2015
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details