tags:

views:

26

answers:

2
A: 

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
You're right. I just realized that I don't need either of those tables anymore as I am handling them in the function.Thanks
cBlaine
A: 

You don't actually appear to be using any columns in ProgramEnrollments or Program, so try removing those 2 JOINs.

AdaTheDev
Thanks for the response. Great community here. Just joined today. Glad I did, I'll be back!
cBlaine