0

Lets say, I have following table(i.e: Reference Table). I want to display my results as 'Expected Table'. How may I get this result? Any help will be highly appreciated. I am using Oracle 10g. Reference Table

Expected:

Expected Table

mathguy
  • 42,476
  • 6
  • 23
  • 50
Nizam Uddin Sikder
  • 427
  • 1
  • 4
  • 9
  • Google "string aggregation Oracle 10g". For example: https://oracle-base.com/articles/misc/string-aggregation-techniques#row_number – mathguy Sep 21 '16 at 18:21

1 Answers1

1
SELECT Collateral_Id,
       LISTAGG(Commitment_Id, ',')
           WITHIN GROUP (ORDER BY Commitment_Id) "Commitment_Id"
FROM yourTable
GROUP BY Collateral_Id
Tim Biegeleisen
  • 451,927
  • 24
  • 239
  • 318