375: select paf.assignment_id
376: ,paf.job_id
377: ,paf.effective_start_date
378: ,paf.assignment_type
379: from per_all_assignments_f paf
380: ,per_assignment_status_types past
381: where paf.organization_id = P_ORGANIZATION_ID_CHILD
382: and P_EFFECTIVE_DATE between paf.effective_start_date
383: and paf.effective_end_date
422: --bug 6124652 starts here
423: ,paf.effective_end_date
424: --bug 6124652 ends here
425: ,paf.assignment_type
426: from per_all_assignments_f paf
427: ,per_assignment_status_types past
428: where paf.organization_id = P_ORGANIZATION_ID_CHILD
429: --bug 6124652 starts here
430: -- and P_EFFECTIVE_DATE between paf.effective_start_date
473: select paf.assignment_id
474: ,paf.job_id
475: ,paf.effective_start_date
476: ,paf.assignment_type
477: from per_all_assignments_f paf
478: ,per_assignment_status_types past
479: where paf.organization_id = P_ORGANIZATION_ID_CHILD
480: --Bug 6124652 starts here
481: -- and paf.effective_start_date <= P_DATE_FROM
483: and paf.effective_end_date
484: --Bug 6124652 ends here
485: and paf.assignment_status_type_id = past.assignment_status_type_id
486: and P_DATE_TO <= (select max(paf1.effective_end_date)
487: from per_all_assignments_f paf1
488: ,per_assignment_status_types past1
489: where paf.assignment_id = paf1.assignment_id
490: and paf1.assignment_status_type_id = past1.assignment_status_type_id
491: and past.per_system_status = past1.per_system_status)
520: is
521: select paf.assignment_id
522: ,paf.job_id
523: ,paf.effective_start_date
524: from per_all_assignments_f paf
525: ,per_assignment_status_types past
526: where paf.organization_id = p_organization_id_child
527: -- and paf.business_group_id = P_BUSINESS_GROUP_ID
528: and paf.assignment_type = 'A'
539: is
540: select paf.assignment_id
541: ,paf.job_id
542: ,paf.effective_start_date
543: from per_all_assignments_f paf,
544: per_assignment_status_types past
545: where paf.organization_id = p_organization_id_child
546: -- and paf.business_group_id = P_BUSINESS_GROUP_ID
547: and paf.assignment_type = 'A'
579: ,pos.actual_termination_date
580: ,paf.job_id
581: ,paf.assignment_id
582: from per_periods_of_service pos
583: ,per_all_assignments_f paf
584: where pos.date_start <= P_DATE_FROM
585: and pos.actual_termination_date is not null
586: and pos.actual_termination_date between P_DATE_FROM
587: and P_DATE_TO
603: ,pos.actual_termination_date
604: ,paf.job_id
605: ,paf.assignment_id
606: from per_periods_of_service pos
607: ,per_all_assignments_f paf
608: where pos.date_start <= P_DATE_FROM
609: and pos.actual_termination_date is not null
610: and pos.actual_termination_date between
611: P_CUR_DATE_FROM and P_CUR_DATE_TO
625: ,pop.actual_termination_date
626: ,paf.job_id
627: ,paf.assignment_id
628: from per_periods_of_placement pop
629: ,per_all_assignments_f paf
630: where pop.date_start <= P_DATE_FROM
631: and pop.actual_termination_date is not null
632: and pop.actual_termination_date between P_DATE_FROM
633: and P_DATE_TO
651: ,pop.actual_termination_date
652: ,paf.job_id
653: ,paf.assignment_id
654: from per_periods_of_placement pop
655: ,per_all_assignments_f paf
656: where pop.date_start <= P_DATE_FROM
657: and pop.actual_termination_date is not null
658: and pop.actual_termination_date between P_CUR_DATE_FROM
659: and P_CUR_DATE_TO