I tried to get some result into a pivot table but not get the expected result.Here by I have put the code and result.
DECLARE @TblIdeaCategory TABLE
(
IdeaImplement varchar(2000),
IdeaCategory varchar(2000)
)
INSERT INTO @TblIdeaCategory values('Metrics Feedback One #1','MetricFeedback')
INSERT INTO @TblIdeaCategory values('Metrics Feedback Two #1','MetricFeedback')
INSERT INTO @TblIdeaCategory values('Analysis Feedback One #1','AnalysisFeedback')
INSERT INTO @TblIdeaCategory values('Analysis Feedback Two #1','AnalysisFeedback')
INSERT INTO @TblIdeaCategory values('Idea Generation Feedback One #1','IdeaGenerationFeedback')
INSERT INTO @TblIdeaCategory values('Idea Generation Feedback Two #1','IdeaGenerationFeedback')
select
IdeaGenerationFeedback,AnalysisFeedback,MetricFeedback from
(select IdeaImplement,IdeaCategory
from @TblIdeaCategory as board
) resultTable
pivot (
max(IdeaImplement) for IdeaCategory in (IdeaGenerationFeedback,AnalysisFeedback,MetricFeedback)) as resultpivot
select IdeaImplement,IdeaCategory from @TblIdeaCategory
