848: and l_effective_date
849: between asg.effective_start_date and asg.effective_end_date))
850: and (( p_organization_id is null )
851: or exists (select null
852: from hr_organization_units org,
853: per_all_assignments_f asg
854: where asg.organization_id = org.organization_id
855: and org.organization_id = p_organization_id
856: and l_effective_date