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 |
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2013-12-18 : 02:21:02
|
I have data as below:ID Journey Segment Type Depart Arrive 1st 2nd12345 1 1 A UK AUS UK NULL12345 1 2 A AUS US NULL USHow can i make it to 1 row for 1st and 2nd column?ID 1st 2nd12345 UK US |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-12-18 : 02:47:05
|
select ID, max([1st]), max([2nd])from yourtablegroup by ID KH[spoiler]Time is always against us[/spoiler] |
 |
|
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2013-12-18 : 02:55:44
|
thanks.got it. |
 |
|
|
|
|