I have a table full of attendance data for students, we are migrating to another student info system and the way they want the flat files to be is one row for each student for each day with all 7 periods listed out. Right now our data is stored as one record per day per period (see attached schema) What would be the best way to format this data to match what I have listed above. I’m also attaching a screenshot of how they want it (each row is a column).
Added screen shot of data.



Ok so pivot was not what I needed. I ended up talking to a colleuge about my problem and he told me to use subqueries. So this is how I solved it!