I am having same problem but for different scenario. Thats what I have:
select * from
(Select * from dbo.vw_gv_Project_ProjectsUsersFunctions) p
pivot(count(test) For FunctionName in
( ,
,
,
,
, [f]))AS pvt
'test' column is an aliased column similar to a column returned by the result. i.e. 'test' is an aliased to 'UserID' column which is also included in the query.
If I put back 'UserID' in the count, the query runs OK.
Thanks in adavance for your assisstance.
Ihab
No comments:
Post a Comment