Answer the question
In order to leave comments, you need to log in
MSSQL query error?
I am getting an error:
Msg 8120, Level 16, State 1, Line 2
Column 'SysAdminUnit.Name' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
SELECT COUNT(l.Id) AS COUNT, l.OwnerId, u.Name
FROM Lead l
LEFT OUTER JOIN SysAdminUnit u ON l.OwnerId = u.Id
WHERE (QualifyStatusId = '6f4ac06a-af62-495d-b13a-e68dc6b9c53b'
OR QualifyStatusId='db93b4dc-45b6-40e4-81f4-d14d43655d0e')
AND CreatedOn LIKE '2018-05-15%'
GROUP BY OwnerId
Answer the question
In order to leave comments, you need to log in
Getting error Column 'SysAdminUnit.Name'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question