The JOIN is not the issue, it's doing what it's meant to do with a one-to-many relationship
You could use a GROUP BY statement on your query, or alternatively use a sub-select to return DISTINCT values from the ProgramEnrollments/Program tables.
You don't seem to be using data from the ProgramEnrollments or Program tables so are they needed in the query (I presume they are, just thought I'd ask the question).
openshac
2010-06-11 15:06:01