Whenever I execute the following query:select member_id,
company.company_code,
company.credit_limit
system,
member_id,
first_name,
last_name,
members.credit_limit,
members.email,
date_sent,
count(*)
from Company, Members
left outer join Reminders on members.email = reminders.email
group by member_id
I get the following error message:
Server: Msg 8120, Level 16, State 1, Line 1
Column 'Company.company_code' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
...and so forth for each field in the select list.
Any ideas?
company.company_code,
company.credit_limit
system,
member_id,
first_name,
last_name,
members.credit_limit,
members.email,
date_sent,
count(*)
from Company, Members
left outer join Reminders on members.email = reminders.email
group by member_id
I get the following error message:
Server: Msg 8120, Level 16, State 1, Line 1
Column 'Company.company_code' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
...and so forth for each field in the select list.
Any ideas?