2858: from pa_expenditure_items_all ei
2859: where ei.transferred_from_exp_item_id = l_exp_item_id_tab(exp_ind)
2860: and ei.transferred_from_exp_item_id is not null
2861: and not exists ( select pp.project_id
2862: from pa_purge_projects pp
2863: where pp.project_id = ei.project_id
2864: and pp.purge_batch_id = p_purge_batch_id ) ;
2865:
2866: FORALL exp_ind IN l_exp_item_id_tab.FIRST .. l_exp_item_id_tab.LAST
2868: set ei.transferred_from_exp_item_id = NULL
2869: where ei.transferred_from_exp_item_id = l_exp_item_id_tab(exp_ind)
2870: and ei.transferred_from_exp_item_id is not null
2871: and not exists ( select pp.project_id
2872: from pa_purge_projects pp
2873: where pp.project_id = ei.project_id
2874: and pp.purge_batch_id = p_purge_batch_id ) ;
2875:
2876: /* Each time thru the loop need to make sure that reset the
3017: and ei1.project_id = p_project_id )
3018: and ei.transferred_from_exp_item_id is not null
3019: and rownum < l_commit_size
3020: and not exists ( select pp.project_id
3021: from pa_purge_projects pp
3022: where pp.project_id = ei.project_id
3023: and pp.purge_batch_id = p_purge_batch_id ) ;
3024: else
3025: insert into Pa_Expend_item_Adj_Activities
3053: and ei.task_id = t.task_id
3054: and ei.transferred_from_exp_item_id is not null
3055: and rownum < l_commit_size
3056: and not exists ( select pp.project_id
3057: from pa_purge_projects pp
3058: where pp.project_id = t.project_id
3059: and pp.purge_batch_id = p_purge_batch_id ) ;
3060: end if;
3061:
3634: and ei1.transferred_from_exp_item_id is not null
3635: and ei1.project_id = p_project_id )
3636: and rownum < l_commit_size */
3637: and not exists ( select pp.project_id
3638: from pa_purge_projects pp
3639: where pp.project_id = ei.project_id
3640: and pp.purge_batch_id = p_purge_batch_id );
3641: /* else */
3642: /* end if; */