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 |
|
missrao
Starting Member
4 Posts |
Posted - 2006-02-12 : 19:30:39
|
| Hi all,I'm joining two tables, one for a name, one for a date. I want the first date associated with each name. I only want one record per name. Each name/date combination is distinct, so that function won't help. I looked at the TOP function, but I don't know how many distinct names I'm going to be getting, so I don't think that function will help me. Does anyone have any suggestions?Thanks a lot!Miss Rao |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2006-02-12 : 19:38:13
|
how about:select name ,min(Date)from myTablegroup by name Be One with the OptimizerTG |
 |
|
|
missrao
Starting Member
4 Posts |
Posted - 2006-02-12 : 21:43:05
|
| Fabulous! That works with my test data. Thank you very much. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|