PL/SQL (MOSC)

MOSC Banner

Dynamic way to transpose raw to column

edited Apr 23, 2013 2:28AM in PL/SQL (MOSC) 17 commentsAnswered
 Hello All,

I want to transpose row data into column.. and i have the following way to do it in case there is fixed column name.. the following query give me proper result no issue at all.  

But In case I have dynamic column name, how I can manage this view ?  Can anyone please provide me a good way (mostly dynamic way) of doing this?


create view hardware_data as 
SELECT  DISTINCT hardware_id, 
max(DECODE(data_key,'Platform Type', data_value)) PlatformType,
max(DECODE(data_key,'Platform Manufacturer', data_value)) PlatformManufacturer
from verifier_capability
group by hardware_id 
order by hardware_id;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center