Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00904: "pivot": invalid identifier

user021Oct 5 2017 — edited Oct 6 2017

When i ran first query it's working fine but in second query where i used pivot showing as "invalid identifier"

1.          select deptno

                      ,      job

                      ,      avg(sal) sal_avg

                      from   emp

                      group

                      by     deptno

                      ,      job

2.select *

from   table( pivot(' select deptno

                      ,      job

                      ,      avg(sal) sal_avg

                      from   emp

                      group

                      by     deptno

                      ,      job

                    ')

            )

This post has been answered by Paulzip on Oct 5 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2017
Added on Oct 5 2017
17 comments
4,646 views