December 27, 2013 at 8:39 am
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.
Any help would be greatly appreciated!
Dave
December 27, 2013 at 8:54 am
You could read this article to find out how to work with CROSS TABS.
http://www.sqlservercentral.com/articles/T-SQL/63681/
For a coded answer, please read the article linked in my signature to now what we need to help you.
December 27, 2013 at 8:58 am
Dude, I am asking for a simple PIVOT example. I am not sure why this is an issue? Please do not clog up my post with links. I am on a strict deadline.
December 27, 2013 at 9:04 am
I'm helping here for free.
If you want simple examples, you can press F1 and find examples on PIVOT. Or you can click on the "useless" link I provided to have different examples.
If you want examples based on your tables and information, you should give us something to work with as you're not the only one with deadlines.
December 27, 2013 at 9:06 am
Can someone help me please?????
December 27, 2013 at 9:08 am
I am not sure if I can create a simpler example than this...
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.
Any help would be greatly appreciated!
December 27, 2013 at 9:29 am
DaveDB (12/27/2013)
Dude, I am asking for a simple PIVOT example. I am not sure why this is an issue? Please do not clog up my post with links. I am on a strict deadline.
You should post sample data, DDL and desired results if you want a working solution.
If you just want examples, there are thousands out there.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply