mercredi 5 août 2020

Pivoting Days/Hours in SQL Servers From Header to Row Level

I have a list of hours that are under headings from and to. I need to Pivot those to be by days with from and to headings. I've tried unpivoting in Excel and Pivot in SQL Server, nothing is working. Each day is corresponded to a SEQ_NO (Monday = 10, Tuesday = 20, etc.). The main problem here is getting the start and end times to be in a different view. Below is the before and after which I want it to look like. Below is Before and After (what I want it to look like).

What I want it to look like After View (what I want it to look like):

Aucun commentaire:

Enregistrer un commentaire