SELECT DISTINCT goal.id FROM `ohrm_performance_goal` goal LEFT JOIN `ohrm_goal_purpose` purpose ON goal.`goal_purpose_id`= purpose.id LEFT JOIN ohrm_individual_development_plan_goal idpg ON (idpg.goal_id = goal.id) LEFT JOIN ohrm_individual_development_plan idp ON (idp.id = idpg.idp_id) LEFT JOIN ohrm_individual_development_plan_status idps ON (idps.state_id = idp.state_id) WHERE purpose.name = "Development" AND idps.name != "NOT INITIATED" AND idps.name IS NOT NULL AND goal.emp_number = #empNumber# AND goal.workflow_status_id = #approvedState# AND goal.due_date BETWEEN #appraisalStartDate# AND #appraisalEndDate#