449:
450: else
451: recursive_construct_denorm(p_process_id => -2);
452:
453: delete from amw_org_hierarchy_denorm
454: where organization_id = p_org_id and
455: hierarchy_type='A';
456: end if;
457:
485: 1,
486: 'A');
487: else --p_org_id is not null
488: forall i in x_process_tbl.first .. x_process_tbl.last
489: insert into amw_org_hierarchy_denorm (ORGANIZATION_ID,
490: PROCESS_ID,
491: PARENT_CHILD_ID,
492: UP_DOWN_IND,
493: LAST_UPDATE_DATE,
635: if(p_org_id is null or p_org_id = -1)
636: then
637: delete from amw_proc_hierarchy_denorm where hierarchy_type='L';
638: else
639: delete from amw_org_hierarchy_denorm
640: where organization_id = p_org_id and
641: hierarchy_type='L';
642: end if;
643:
671: 1,
672: 'L');
673: else --p_org_id is not null
674: forall i in x_process_tbl.first .. x_process_tbl.last
675: insert into amw_org_hierarchy_denorm (ORGANIZATION_ID,
676: PROCESS_ID,
677: PARENT_CHILD_ID,
678: UP_DOWN_IND,
679: LAST_UPDATE_DATE,