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!

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.

Pivot Tables

30303b71-e15b-44a4-a3f9-6a4680ce976fDec 24 2018 — edited Dec 24 2018

Hi guys,

I'm new to Oracle and I'm having a bit of trouble with the PIVOT command, most of the examples I've seen seem to revolve around counts and sums in the pivoyed column. I want to see the actual values in each column.

For example, I have a table that looks like this

EmployeeId    CategoryId    Value

1        1        UK

1        2        12345

1        3        XYZ

2        1        IE

2        2        56789

3        1        US

3        2        98765

3        3        ABC

And, what I want to see id this

EmployeeId    1    2    3

1        UK    12345    XYZ

2        IE    56789

3        US    98765    ABC

Any help would be appreciated

Comments

Processing

Post Details

Added on Dec 24 2018
2 comments
210 views