Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Pivot issues

$
0
0
Happy holidays!
I am having issues using PIVOT. I have never seemed to truly understand the syntax behind it and I know this is a simple question....

I have a simple table that has 3 columns: DayofWeek (Mon - Fri), Time(8:00AM - 5:00PM for each day), and CallsOffered (This is the aggregate). I just need to pivot on the DayofWeek, so I can have Mon - Friday as column names and I cannot seem to do it correctly.

The table looks like this...

Monday - 8:30AM - 1254.52
Monday - 9:00AM - 546.32
Tuesday - 8:30AM - 5649.32
Tuesday - 9:00AM - 654.00
Wednesday - 9:00AM - 546.32
Wednesday - 9:00AM - 546.32
Thursday - 9:00AM - 546.32
Thursday- 9:00AM - 546.32
Friday - 9:00AM - 546.32
Friday - 9:00AM - 546.32


Any help would be greatly appreciated!

Dave

Dave SQL Developer



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>