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 |
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2008-02-04 : 14:28:03
|
| SELECT distinct emailAddress FROM emailaddresses WHERE subscribed =1this works but i really need the emailaddressid field?how can i get it?if i do SELECT distinct emailAddress,emailaddressid FROM emailaddresses WHERE subscribed =1 - it's no longer the distinct emails |
|
|
hey001us
Posting Yak Master
185 Posts |
Posted - 2008-02-04 : 14:34:30
|
| SELECT emailAddress, max(emailaddressid) emailaddressid FROM emailaddresses WHERE subscribed =1 group by emailAddresshey |
 |
|
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2008-02-04 : 15:10:35
|
| thanks this worked |
 |
|
|
|
|
|