Solved

oracle pivot column names with embeddded spaces

Posted on 2011-09-27
2
905 Views
Last Modified: 2012-06-22
I am pivoting an oracle view on a certain column. The values in this column may contain embedded spaces. I can get the column names to pivot ok if I surround them with single quotes, however, they then appear in the result with the quotes! Is there any way to get the pivoted column values/names to appear without the quotes? Assume it would not be possible to change the values in the pivoted column to eliminate the blanks.

I have attached a screen image that shows what I mean. pivot table
0
Comment
Question by:bassman592
2 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 36710347
for metric in ('PATS' as "PATS", 'PATS Ratio' as "PATS Ratio", 'TRX' as "TRX", 'TRX Ratio' as "TRX Ratio")
0
 

Author Closing Comment

by:bassman592
ID: 36710411
Beautiful! Thank you.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question