Hi I am new to Sql Programming.
I have a table "Temp" having two fields "Name" & "Software"
I am pivoting a table that displays the name and number of versions of software to him.
My query for pivot is :
select * from temp
pivot(count(Software) for Software in ([Professional],[Personal],[Standard])) as PVT
But instead of giving static value in in ([Professional],[Personal],[Standard])
I want to select the software names from select query that should be : select distinct software from temp
When I write this select query to in clause it gives error.
How do I achieve this?
Please help . Thanks in advance.