Anju D

Anju D

  • NA
  • 13
  • 597

PIVOT and UNPIVOT in SQL

Jul 28 2020 2:04 AM
help me out in solving this problem. my table is like below.
 
 UniqueId ActivityName
 111 activity1
 112 activity1
 111 activity2
 113 activity2
i want the result like below using sql pivoting query 2016
 
 UniqueId activityname activity1 activity2 
 111 activity1 yes yes 
 112 activity1 yes No 
 113 activity2 No yes 
 

Answers (10)