PIVOT

Converting Row to Column use Pivot feature TIP #62

  Problem:  Sometimes we may require to convert row data to column. we require pivot view of data. Solution:  Lets understand this by an example below I am using a table variable which have few columns like  Employee, Amount, Month and year. Lets define and create some sample data here. DECLARE @tblEmployee AS TABLE (Employee        …