Reputation: 16979
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
Upvotes: 0
Views: 85