SELECT EmployeeDetailID, name, [May-13],[Jun-13],[Jul-13] FROM (SELECT EmployeeDetailID, name, AbsentDays, month FROM table1) AS src PIVOT ( sum(AbsentDays) FOR month IN ([May-13],[Jun-13],[Jul-13]) )AS pvt
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)