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.
Author |
Topic |
Rick_Boston
Starting Member
5 Posts |
Posted - 2009-03-09 : 22:02:56
|
Query help At present i have a table as followsip_address page_requested192.168.1.1 www.com192.168.1.1 www.2.com192.168.1.1 www.3.com193.131.2.1 www.go.com193.131.2.1 www.go2.com193.131.2.1 www.go3.com 193.131.2.1 www.go4.comI am looking for a query to help me re organise/create a new table as show belowIp_address page_requested page_requested2 page_requested3 192.168.1.1 www.com www.2.com www.3.com193.131.2.1 www.go.com www.go2.com www.go3.com ...cont I also have hundreds more ip’s that have visited various amounts of pages. So the new rows will need to auto fill depending on how many pages the ip has visitedThanks Rick |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-03-09 : 22:16:05
|
Look at PIVOT. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-10 : 04:25:56
|
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx |
|
|
Rick_Boston
Starting Member
5 Posts |
Posted - 2009-03-12 : 18:52:19
|
That is perfect thanks mate#rick |
|
|
|
|
|