i have one table
the Above data i want show like
| WORKEDDAYS | ANNUAL LEAVE | WEEKLY OFF | COMP OFF |
| 8 | 1 | 1 | 1 |
PLEASE TELL ME WHAT IS THE QUERY I WANT WRITE
IAM TRYING LIKE BELLOW BUT IAM NOT GETTING RESULT PLEASE TELL ME
| WORKEDDAYS | ANNUAL LEAVE | WEEKLY OFF | COMP OFF |
| 8 | 1 | 1 | 1 |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question.
Ranjit PowarPosted Oct 1, 2014, 12:30 AM
Abhishek KumarPosted Sep 30, 2014, 8:20 AM
Please modify the query as per your requirement.
Select * from
(
Select day,status from userdb.dbo.timesheet
) a
pivot
(
max(day) for status in (WORKEDDAYS,ANNUALLEAVE ,WEEKLYOFF , COMPOFF
)pv
Hope this will help.
Abhishek