If i run the code below then i'll get the error returned - can anyone suggest the easiest way around this...
Msg 116, Level 16, State 1, Line 4
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
Select * from
where email in
SELECT email, COUNT(email) AS NumOccurrences, companyid
GROUP BY email, companyid
HAVING (COUNT(email) > 1 )