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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek KumarRank #510 · 4.8K reputationPosted Sep 30, 2014, 4:20 AM EDT
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
Ranjit PowarRank #553 · 4.4K reputationPosted Sep 30, 2014, 8:30 PM EDT