693: num_rows => x_num_rows);
694: end if;
695:
696:
697: x_purge_rec.table_name := 'WSM_COPY_OP_RESOURCE_USAGE';
698:
699: if (p_option = REPORT_ONLY) then
700: select count(*)
701: into x_num_rows
698:
699: if (p_option = REPORT_ONLY) then
700: select count(*)
701: into x_num_rows
702: from WSM_COPY_OP_RESOURCE_USAGE
703: where wip_entity_id = x_purge_rec.wip_entity_id;
704:
705: else
706:
703: where wip_entity_id = x_purge_rec.wip_entity_id;
704:
705: else
706:
707: DELETE FROM WSM_COPY_OP_RESOURCE_USAGE
708: WHERE wip_entity_id = x_purge_rec.wip_entity_id;
709: x_num_rows := SQL%ROWCOUNT;
710:
711: end if;