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 |
|
Cathryn
Starting Member
4 Posts |
Posted - 2009-02-18 : 19:29:02
|
| have a tableCol1 Col2 Col3 Col4 Col5----- ------ ------ ----- ------1 abc NULL NULL NULL1 NULL def NULL NULL1 NULL NULL ghi NULL1 NULL NULL NULL jklI want:Col1 Col2 Col3 Col4 Col5----- ------ ------ ----- ------1 abc def ghi jklAt first I thougt I could use pivot which I'm not sure how to do that but then I started doubting that. Any help would be great!Thanks~! |
|
|
SQLforGirls
Starting Member
48 Posts |
Posted - 2009-02-18 : 19:31:43
|
| If it's truly as simple as that, you should be able to use MAX()select col1,max(col2),max(col3),max(col4),max(col5)from Table1group by col1Hope that helps. |
 |
|
|
Cathryn
Starting Member
4 Posts |
Posted - 2009-02-18 : 20:12:23
|
| Ok - I feel completely stupid. I thought I tried that and got an error b/c my values weren't integers..I must have been staring at it too long...making something simple too difficult.Thanks! |
 |
|
|
|
|
|