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 |
|
srucker
Starting Member
26 Posts |
Posted - 2010-03-23 : 09:37:33
|
| I am building a temp table to store a bunch of grouped records and need to get the earliest and latest dates for each group.1 1 1/1/2008 - 12/31/20081 2 1/1/2010 - 12/31/20101 3 1/1/2009 - 12/31/2009trying to result w/:1/1/2008 - 12/31/2010thx in adv! |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-03-23 : 09:42:54
|
[code]select col1, min(start_date), max(end_date)from sometablegroup by col1[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
srucker
Starting Member
26 Posts |
Posted - 2010-03-23 : 09:47:09
|
| min, max nice! Thank you! |
 |
|
|
|
|
|