Solved

oracle pivot column names with embeddded spaces

Posted on 2011-09-27
2
929 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

749 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