Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to transpose columns and rows in 9i SQL*Plus

Re: How to transpose columns and rows in 9i SQL*Plus

From: Tom Pall <oracle.list_at_gmail.com>
Date: Fri, 10 Nov 2006 18:53:17 -0600
Message-ID: <7cf45f7f0611101653h56408fe9j1d2dff121f6343af@mail.gmail.com>


Barbara and Peter,

I thank you both.

In the beginning, Larry created Metalink and saw that it was good. Then some dudes got together and created Google, which works wonders if you use the right incantations. After getting nothing with (sqlplus rows columns swap) the word "transpose" came to me. Yup. found the AskTom thread on pivots. I hardcoded 3 decodes and there it was. I've handed the output to the customer to review. Yes, there are lots of empty rows because so far there's 10 days of data and I coded for 3. If the customer approves of the format, now comes the fun part: selecting distinct date where date between 10/31/06 and trunc(sysdate-1.'DD') in my SQL which creates then runs SQL. Gosh they'll be long rows. Better throw in some Wrap Music with the SQL. when I hand it to my boss, the wannabe DBA. <G>

I haven't looked at Oracle-L for years even though I've been collecting it for in Gmail since Gmail first became it beta. It seemed to start off as every question answered to random questions getting a deluged and other questions getting no response at all. I don't know which it is now but my question got answered right about the time I discovered AskTom's solution.

Happy and Grateful to be part of the Oracle DBA community, Tom

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Nov 10 2006 - 18:53:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US