Your report should have a unique combinations of values from the group by
. So, these four columns should be unique:
GROUP BY M.Acronym, DC.Name, D.Name,B.Description
If I had to guess, you are getting duplicates because B.Description
is duplicated in the B
table. I would suggest removing it from the GROUP BY
and changing this line:
ISNULL(B.Description, '') AS Description,
to
ISNULL(max(B.Description), '') AS Description,