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 |
|
Topaz
Posting Yak Master
199 Posts |
Posted - 2011-02-22 : 09:36:16
|
| How can I modify the select query to lookup more than just the website field?SELECT website, count(acc_ref) as acc_ref from wce_contact with (nolock) where acc_ref is not null and batch like 351group by websiteI thought that if I to use this query it would show me the results but selecting the extra fields?SELECT website, email, company count(acc_ref) as acc_ref from wce_contact with (nolock) where acc_ref is not null and batch like 351group by websiteSQL produces a weird error. Can somebody please help.ThanksJT |
|
|
chris_n_osborne
Starting Member
34 Posts |
Posted - 2011-02-22 : 09:43:59
|
| Change:group by websiteTo:group by website, email |
 |
|
|
Topaz
Posting Yak Master
199 Posts |
Posted - 2011-02-22 : 09:48:13
|
| That worked a treat. Thanks!JT |
 |
|
|
|
|
|