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 |
Cowboy
Yak Posting Veteran
72 Posts |
Posted - 2008-11-13 : 04:47:38
|
Hi all,I have a table that has mutliple rows with the same id's but different date values. When there is an id on multiple rows I want to put it on one row with the dates in different columns if thats possible.for example:id date1 10/12/18992 10/12/19002 10/12/19013 10/12/19053 10/12/19053 10/12/1905would be arranged:id date1 date2 date31 10/12/1899 null null2 10/12/1900 10/12/1901 null3 10/12/1905 10/12/1905 10/12/1905thanksWI want to build a spaceship with ligthspeed capabilities and I don't even know what a wrench is. |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-11-13 : 05:53:38
|
search around here for Pivot or Cross Tabs._______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.1 out! |
 |
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2008-11-13 : 06:03:10
|
Check the FAQ -- this is one of the most frequently asked questions.http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210There are some good articles on doing this in 2000 (there are additional operators that make this a bit easier in 2005)Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
Cowboy
Yak Posting Veteran
72 Posts |
Posted - 2008-11-13 : 06:13:24
|
Thanks I'll have a look at the FAQs, just needed a point in the right direction appreciated!I want to build a spaceship with ligthspeed capabilities and I don't even know what a wrench is. |
 |
|
Cowboy
Yak Posting Veteran
72 Posts |
Posted - 2008-11-13 : 06:15:16
|
What should I be looking for in the FAQ?I want to build a spaceship with ligthspeed capabilities and I don't even know what a wrench is. |
 |
|
Cowboy
Yak Posting Veteran
72 Posts |
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
|
|
|
|