On execution of a pivot i am getting ORA-00936: missing expression

1k Views Asked by At

On execution of the following sql statement i am getting an error [Error] Execution (23: 69): ORA-00936: missing expression

select sno,nam,gender,salary from cus pivot xml (count(sno) for nam in (any));

Can we use a column name without any grouping expressions? Actually i want the entire a column names as the row header for the particular table. thanks in advance

let the table be

---------   --------    -----------------------

name        sno        salary

---------   --------    -----------------------

sony         1         20000

sweety       2         17500

the above is the sample table.the result i wish is as follows

---------   --------    

snoy        sweety        

---------   --------

1            2
20000        17500

for two values i can use IN operator but i had 50 rows or 50 values but how can i display them.

0

There are 0 best solutions below