Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion SQL Query: Switching Rows to Columns dynamically.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ian  
View profile  
 More options Oct 17 2006, 8:45 am
Newsgroups: comp.databases.oracle.misc
From: "ian" <ipel...@yahoo.com>
Date: 17 Oct 2006 05:45:09 -0700
Local: Tues, Oct 17 2006 8:45 am
Subject: Re: SQL Query: Switching Rows to Columns dynamically.
Hi;

I know this is NOT strictly an SQL answer, but I have just done this
using Perl.

I do cheat in the SQL by ||'!'|| each of the columns into one wide "set
lines 5000" row per row set.
Then a simple perl script to "pivot" all this into a nice tall Excel
sheet for my user(s).

Perl is basically :-
While (<>){
    read each line into an array

}

{
   Foreach column
       foreach row
             print cell

}

I currently pivot over 300 columns into no more than 25 rows using
"where ... and rownum < 25"
Made my life much easier, and my butt shines!!
I even union'ed an header row so users can see each named Excel row.

Sorry if this is no help.  Just my bit to the list.

Regards
Ian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.