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!

Unpivot Command

738291Feb 25 2010 — edited Feb 26 2010
I am trying to unpivot these columns using the "unpivot" command. the command works, but the only value returned is that of the first column in the "IN" clause:

select * from DEMAND_FACTS_LOAD
UNPIVOT
(Measure_Amts for Measures IN (
ELE_FUEL_CONSUMPTION,
NET_GENERATION_MWH,
IND_FUEL_CONSUPMTION,
TOTAL_FUEL_CONSUMPTION,
AVG_NET_GENERATION_MWH,
ELECTRIC_MMBTU
))

All of the columns are numeric and only the first column - FUEL_CONSUMPTION - returns its values unpivoted. The remaining columns (unpivoted rows) do not pivot! The other columns to be pivoted all contain numeric data in them. Any insight would be appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2010
Added on Feb 25 2010
1 comment
765 views