We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
ALTER PROCEDURE dbo.TaskStatusPivot as Declare @strSQL varchar(max) DECLARE @cols varchar(2000) SELECT @cols = STUFF(( SELECT DISTINCT TOP 100 PERCENT '],[' + task FROM WeekTaskStatus ORDER BY '],[' + task FOR XML PATH('') ), 1, 2, '') + ']' set @strSQL = 'select CONVERT(varchar,WeekEnd,101) as WeekEnding, ' + @cols + ' from ( select WeekEnd, Task, TaskStatus from WeekTaskStatus) o pivot (Max(TaskStatus) for Task in (' + @cols + ')) p' exec(@strSQL)
Add your voice to the tech community where 5M+ people just like you are talking about what matters.