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!

Pivot in Oracle 10g

804215Oct 11 2011 — edited Oct 11 2011
Hi All,

I am using SQL*Plus: Release 10.2.0.1.0 - Production version of oracle 10g.

I am trying to use pivot function but it is giving error

select * from
(select physicianid,fname from t_physician)
pivot
(count(physicianid) for fname in ('Thomas','Jason'))
/

(count(physicianid) for fname in ('Thomas','Jason'))
*
ERROR at line 4:
ORA-00933: SQL command not properly ended


This is the query i am using.

Regards,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2011
Added on Oct 11 2011
4 comments
550 views