Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Pivot Table in SQL

Author  Topic 

pcg2007
Starting Member

2 Posts

Posted - 2010-01-11 : 10:09:04
Hello,

I want to set up a pivot table based on two fields in my CRM table:

Creationtime - datetime stamp
primaryreason - text string

How I want to set it up is to have each distinct reason code along the top as columns (there are about 20), and for rows, I want to show 1 hour blocks (8am, 9am, etc.) disregarding the month, date, and year from the time stamp.

The data area would be a count of each distinct reason code during that hour.

Can this be done?

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-01-11 : 10:30:49
can you show sample output please?
Go to Top of Page
   

- Advertisement -