Re: Pivot table Query - Need help in building correct logic
From: Pankaj <harpreet.noni_at_gmail.com>
Date: Thu, 3 Dec 2009 18:02:56 -0800 (PST)
Message-ID: <5a837f75-424e-4246-aeed-7d321e315582_at_n35g2000yqm.googlegroups.com>
On Dec 3, 7:04 pm, joel garry <joel-ga..._at_home.com> wrote:
> On Dec 3, 4:28 pm, Pankaj <harpreet.n..._at_gmail.com> wrote:
>
>
>
>
>
> > On Dec 3, 7:08 pm, Peter Nilsson <ai..._at_acay.com.au> wrote:
>
> > > On Dec 4, 10:36 am, Pankaj <harpreet.n..._at_gmail.com> wrote:
>
> > > > Greetings,
>
> > > > I have a table format as below
>
> > > > sec value type
> > > > X 100 T
> > > > X 200 S
> > > > Y 300 T
> > > > Y 400 S
> > > > Z 500 T
> > > > Z 600 S
>
> > > > I want to pivot the above to somethin as below
>
> > > > sec T S
> > > > X 100 200
> > > > Y 300 400
> > > > Z 500 600
>
> > > > Can anyone please advise. I have been looking for pivot
> > > > logic for some time but could not figure this out.
>
> > > <http://www.lmgtfy.com/?q=oracle+pivot+query&l=1>
>
> > > --
> > > Peter- Hide quoted text -
>
> > > - Show quoted text -
>
> > Thanks Peter. As I said earlier, I did tried google but could not
> > found the correct way of implementing the logic. Also, the domain for
> > sec is not fixed. I have just shown X, Y and Z but there could be
> > more.
>
> > Thanks for your time.
>
> Oddly enough, clicking on that link led me directly to this one:http://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID...
>
> You must be so cool, getting people to google for you!
>
> jg
> --
> _at_home.com is bogus.
> "Contrary to what I said at the time, we must go after the idiots who
> lost the discs and stick cocktail sticks in their eyes until they beg
> for mercy." - Jeremy Clarkson- Hide quoted text -
>
> - Show quoted text -
Date: Thu, 3 Dec 2009 18:02:56 -0800 (PST)
Message-ID: <5a837f75-424e-4246-aeed-7d321e315582_at_n35g2000yqm.googlegroups.com>
On Dec 3, 7:04 pm, joel garry <joel-ga..._at_home.com> wrote:
> On Dec 3, 4:28 pm, Pankaj <harpreet.n..._at_gmail.com> wrote:
>
>
>
>
>
> > On Dec 3, 7:08 pm, Peter Nilsson <ai..._at_acay.com.au> wrote:
>
> > > On Dec 4, 10:36 am, Pankaj <harpreet.n..._at_gmail.com> wrote:
>
> > > > Greetings,
>
> > > > I have a table format as below
>
> > > > sec value type
> > > > X 100 T
> > > > X 200 S
> > > > Y 300 T
> > > > Y 400 S
> > > > Z 500 T
> > > > Z 600 S
>
> > > > I want to pivot the above to somethin as below
>
> > > > sec T S
> > > > X 100 200
> > > > Y 300 400
> > > > Z 500 600
>
> > > > Can anyone please advise. I have been looking for pivot
> > > > logic for some time but could not figure this out.
>
> > > <http://www.lmgtfy.com/?q=oracle+pivot+query&l=1>
>
> > > --
> > > Peter- Hide quoted text -
>
> > > - Show quoted text -
>
> > Thanks Peter. As I said earlier, I did tried google but could not
> > found the correct way of implementing the logic. Also, the domain for
> > sec is not fixed. I have just shown X, Y and Z but there could be
> > more.
>
> > Thanks for your time.
>
> Oddly enough, clicking on that link led me directly to this one:http://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID...
>
> You must be so cool, getting people to google for you!
>
> jg
> --
> _at_home.com is bogus.
> "Contrary to what I said at the time, we must go after the idiots who
> lost the discs and stick cocktail sticks in their eyes until they beg
> for mercy." - Jeremy Clarkson- Hide quoted text -
>
> - Show quoted text -
Thanks Joel. I will get back in case any more queries. Received on Thu Dec 03 2009 - 20:02:56 CST