0

The Query

select incident.incidentID,
GROUP_CONCAT(moccode2.Description) as MOC2Description 
from incident
join incidentmoc on incident.IncidentID = incidentmoc.IncidentID
inner join moccode2 on moccode2.id = incidentmoc.moccodeid
where incident.IncidentID=962
group by moccode2.Description

The results:

incidentID, MOC2Description
962, Therapist
962, Obscentiy

What I'm shooting for

incidentID, MOC2Description
962, Therapist, Obscentiy

1 Answer 1

3

You need to group on incident.incidentID instead.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.