how can I directly use it with query like my query is creating pivot column using pivot xml.
I want to extract tag names and convert them into columns.
select dept, pno from employee
pivot xml (select employee-type from employee).
I want to create columns based on employee-type xml columns.
Any idea how to do that ?