http://sqlfiddle.com/#!3/e4891/1
for the above resulting query(which pivots data) I want to run my one more select condition.
For example
select (C1 & C2) from ‘the above pivoted query results’
IS it possible to do it? CTE will help here?
SQL Server 2008 and above.
Try this:
SQLFiddle: http://sqlfiddle.com/#!3/e4891/3