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 2000 Forums
 Transact-SQL (2000)
 cross tab layout

Author  Topic 

jamie
Aged Yak Warrior

542 Posts

Posted - 2004-11-11 : 06:12:59
hello sqlers.

I currently have a table of data like :

Time Day Date Name
1:08 sunday 01/08/2004 joe bloggs
17:45 tuesday 03/08/2004 fred bloggs
19:30 wednesday 04/08/2004 jill blah


I need to create a query to show the data in this format :

8:30 - 11:59 12:00- 16:59 17:00 - 08:29

mon - thurs 0 0 2
fri 0 0 0
sat 0 0 0
sun 0 1 0

if this possible in T-SQL ?

thanks for any help / links / etc.
Jamie

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2004-11-11 : 07:10:40
This should help get you started

[url]http://www.sqlteam.com/item.asp?ItemID=5741[/url]

Andy
Go to Top of Page

jamie
Aged Yak Warrior

542 Posts

Posted - 2004-11-11 : 07:53:15
perfect mate.

thanks
Go to Top of Page
   

- Advertisement -