I have tried getting this working but haven't had any success. I am trying to get this this working on SQL Server where the rows are converted to columns. Here is the SQL:
select *
(
select foldername, prcIncidentManagement.CallCategory
from prcIncidentManagement
)
pivot
(
count(foldername)
for prcIncidentManagement.CallCategory in ('Software','Hardware'.etc..)
)
The actual CallCategory
field had more than 20 values. Is there any way of dynamically selecting all *, without predefining it if a new value gets added.
Thank you.