Re: oracle row months in columns
From: master44 <trpost_at_gmail.com>
Date: Tue, 28 Dec 2010 12:59:43 -0800 (PST)
Message-ID: <2cdbcee0-a879-4407-b57f-0b6dc20aa13b_at_l8g2000yqh.googlegroups.com>
On Dec 27, 6:39 pm, joel garry <joel-ga..._at_home.com> wrote:
> On Dec 27, 3:27 pm, master44 <trp..._at_gmail.com> wrote:
>
>
>
>
>
> > 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
>
> http://lmgtfy.com/?q=pivot+query+site%3Aasktom.oracle.com
>
> jg
> --
> _at_home.com is bogus.http://www.computerweekly.com/Articles/2010/12/27/244642/CW+-Analyst3...
> hmmmmmm....- Hide quoted text -
>
> - Show quoted text -
Date: Tue, 28 Dec 2010 12:59:43 -0800 (PST)
Message-ID: <2cdbcee0-a879-4407-b57f-0b6dc20aa13b_at_l8g2000yqh.googlegroups.com>
On Dec 27, 6:39 pm, joel garry <joel-ga..._at_home.com> wrote:
> On Dec 27, 3:27 pm, master44 <trp..._at_gmail.com> wrote:
>
>
>
>
>
> > 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
>
> http://lmgtfy.com/?q=pivot+query+site%3Aasktom.oracle.com
>
> jg
> --
> _at_home.com is bogus.http://www.computerweekly.com/Articles/2010/12/27/244642/CW+-Analyst3...
> hmmmmmm....- Hide quoted text -
>
> - Show quoted text -
Thanks, I have spent many hours with different Google searches and browsing the AskTom site, still not real clear how to make this work. Received on Tue Dec 28 2010 - 14:59:43 CST