oracle row months in columns

From: master44 <trpost_at_gmail.com>
Date: Mon, 27 Dec 2010 15:27:46 -0800 (PST)
Message-ID: <dee70e40-a906-498a-b36f-9854914826e1_at_r29g2000yqj.googlegroups.com>



I have a query that returns results like this:

Month Agent Cases Worked

----------------   -----------   -----------------------
Sept              Tom            5
Sept              John           12
Sept              Megan         6
Oct               Tom             2
Oct               John            7
Oct               Megan         8
Nov               Tom            11
Nov               John           13
Nov               Megan        16

I am looking to plot this data as a multiple line graph, and would like to change the output to look something like this, but am not having any luck:

Agent Sept Oct Nov
---------- ------- ------- -------

Tom          5          2        11
John         12         7        13
Megan      6           8        16

This is just a sample output, and the number of months returned or number of agents returned is variable, so for example above we are showing 3 months and 3 agents, but the result set could have 12 months and 5 agents as an example so the query would need to be dynamic to accomidate.

Thanks Received on Mon Dec 27 2010 - 17:27:46 CST

Original text of this message