834: and l_effective_date
835: between asg.effective_start_date and asg.effective_end_date))
836: and (( p_organization_id is null )
837: or exists (select null
838: from hr_organization_units org,
839: per_all_assignments_f asg
840: where asg.organization_id = org.organization_id
841: and org.organization_id = p_organization_id
842: and l_effective_date