[Home] [Help]
235: AND dp_dimension_code <> 'TIM'
236: AND dh.hierarchy_id = hl.hierarchy_id
237: AND level_id NOT IN
238: (select distinct level_id
239: from msd_level_values lv);
240:
241: --
242: -- Validate Time dimensions has values
243: --
3219: select to_char(instance_id), to_char(validation_org_id) sr_level_pk
3220: from msc_apps_instances
3221: minus
3222: select instance, sr_level_pk
3223: from msd_level_values_ds
3224: where demand_plan_id = p_demand_plan_id
3225: and level_id = 7;
3226:
3227:
3271: cursor invalid_internal_orgs (p_demand_plan_id number)
3272: is
3273: select mdio.sr_organization_id, mlv.level_value
3274: from msd_dp_iso_organizations mdio,
3275: -- msd_level_values_ds geo,
3276: msd_level_values_ds org,
3277: msd_level_values mlv
3278: where mdio.demand_plan_id = p_demand_plan_id
3279: and mdio.demand_plan_id = org.demand_plan_id
3272: is
3273: select mdio.sr_organization_id, mlv.level_value
3274: from msd_dp_iso_organizations mdio,
3275: -- msd_level_values_ds geo,
3276: msd_level_values_ds org,
3277: msd_level_values mlv
3278: where mdio.demand_plan_id = p_demand_plan_id
3279: and mdio.demand_plan_id = org.demand_plan_id
3280: and mdio.sr_instance_id = org.instance
3273: select mdio.sr_organization_id, mlv.level_value
3274: from msd_dp_iso_organizations mdio,
3275: -- msd_level_values_ds geo,
3276: msd_level_values_ds org,
3277: msd_level_values mlv
3278: where mdio.demand_plan_id = p_demand_plan_id
3279: and mdio.demand_plan_id = org.demand_plan_id
3280: and mdio.sr_instance_id = org.instance
3281: --and geo.level_id = 15