0

This is how my table look like:

Number1     Type    REASON_CODE ACCEPT_TYPE CREATION_DATE
30745578    MAIN    0                  A    11/8/2014 1:57
30745578    MAIN    0                  B    11/8/2014 2:02
007159812X  MAIN    0                  A    11/3/2014 11:16

This is how I want the results:

Number1     Type    REASON_CODE ACCEPT1 ACCEPT2 CREATION_DATE1  CREATION_DATE2
30745578    MAIN    0                 A    B    11/8/2014 1:57  11/8/2014 2:02
007159812X  MAIN    0                 A    A    11/3/2014 11:16 11/3/2014 11:16

How can I achieve that?

user3114645
  • 57
  • 3
  • 16

1 Answers1

1

If you need them as real database columns you should Look up the PIVOT command.

Otherwise you can use LISTAGG() to build a long Text with all relevant info.

Falco
  • 3,287
  • 23
  • 26