Thursday, June 20, 2019

SQL Server: dynamic columns based on row values (Date)

I have spent an hour already on this problem.



I want to dynamically generate columns based on the values from the column AttendanceDate.



I have found some similar questions, but unfortunately the examples were too complicated for me to comprehend.



Data:



enter image description here



Expected output:



enter image description here

No comments:

Post a Comment