DBA Data[Home] [Help]

VIEW: APPS.MSC_PLANS_TREE_V

Source

View Text - Preformatted

SELECT p.plan_id, p.compile_designator, d.description, p.organization_id, p.sr_instance_id, o.organization_id, o.sr_instance_id, NVL(d.organization_selection,3), d.disable_date, p.plan_type, p.curr_plan_type, ml.meaning, p.curr_assignment_set_id, p.curr_full_pegging, p.plan_capacity_flag, d.demand_class, p.plan_completion_date, p.data_completion_date, d.designator_id , p.daily_cutoff_bucket , p.weekly_cutoff_bucket , p.period_cutoff_bucket FROM msc_designators d, msc_plan_organizations o, msc_plans p, mfg_lookups ml WHERE p.organization_id = d.organization_id AND p.sr_instance_id = d.sr_instance_id AND p.compile_designator = d.designator AND p.plan_id = o.plan_id AND p.plan_completion_date IS NOT NULL AND p.data_completion_date IS NOT NULL AND p.plan_id <> -1 AND ml.lookup_type = 'MSC_PLAN_TYPE' AND ml.lookup_code = p.curr_plan_type AND nvl(p.COPY_PLAN_ID,-1) = -1 AND nvl(d.COPY_DESIGNATOR_ID,-1) = -1 UNION SELECT p.plan_id, p.compile_designator, d.description, p.organization_id, p.sr_instance_id, p.organization_id, p.sr_instance_id, NVL(d.organization_selection,3), d.disable_date, p.plan_type, p.curr_plan_type, ml.meaning, p.curr_assignment_set_id, p.curr_full_pegging, p.plan_capacity_flag, d.demand_class, p.plan_completion_date, p.data_completion_date , d.designator_id , p.daily_cutoff_bucket , p.weekly_cutoff_bucket , p.period_cutoff_bucket FROM msc_designators d, msc_plans p, mfg_lookups ml WHERE p.organization_id = d.organization_id AND p.sr_instance_id = d.sr_instance_id AND p.compile_designator = d.designator AND p.plan_completion_date IS NOT NULL AND p.data_completion_date IS NOT NULL AND p.plan_id <> -1 AND ml.lookup_type = 'MSC_PLAN_TYPE' AND ml.lookup_code = p.curr_plan_type AND nvl(p.COPY_PLAN_ID,-1) = -1 AND nvl(d.COPY_DESIGNATOR_ID,-1) = -1
View Text - HTML Formatted

SELECT P.PLAN_ID
, P.COMPILE_DESIGNATOR
, D.DESCRIPTION
, P.ORGANIZATION_ID
, P.SR_INSTANCE_ID
, O.ORGANIZATION_ID
, O.SR_INSTANCE_ID
, NVL(D.ORGANIZATION_SELECTION
, 3)
, D.DISABLE_DATE
, P.PLAN_TYPE
, P.CURR_PLAN_TYPE
, ML.MEANING
, P.CURR_ASSIGNMENT_SET_ID
, P.CURR_FULL_PEGGING
, P.PLAN_CAPACITY_FLAG
, D.DEMAND_CLASS
, P.PLAN_COMPLETION_DATE
, P.DATA_COMPLETION_DATE
, D.DESIGNATOR_ID
, P.DAILY_CUTOFF_BUCKET
, P.WEEKLY_CUTOFF_BUCKET
, P.PERIOD_CUTOFF_BUCKET
FROM MSC_DESIGNATORS D
, MSC_PLAN_ORGANIZATIONS O
, MSC_PLANS P
, MFG_LOOKUPS ML
WHERE P.ORGANIZATION_ID = D.ORGANIZATION_ID
AND P.SR_INSTANCE_ID = D.SR_INSTANCE_ID
AND P.COMPILE_DESIGNATOR = D.DESIGNATOR
AND P.PLAN_ID = O.PLAN_ID
AND P.PLAN_COMPLETION_DATE IS NOT NULL
AND P.DATA_COMPLETION_DATE IS NOT NULL
AND P.PLAN_ID <> -1
AND ML.LOOKUP_TYPE = 'MSC_PLAN_TYPE'
AND ML.LOOKUP_CODE = P.CURR_PLAN_TYPE
AND NVL(P.COPY_PLAN_ID
, -1) = -1
AND NVL(D.COPY_DESIGNATOR_ID
, -1) = -1 UNION SELECT P.PLAN_ID
, P.COMPILE_DESIGNATOR
, D.DESCRIPTION
, P.ORGANIZATION_ID
, P.SR_INSTANCE_ID
, P.ORGANIZATION_ID
, P.SR_INSTANCE_ID
, NVL(D.ORGANIZATION_SELECTION
, 3)
, D.DISABLE_DATE
, P.PLAN_TYPE
, P.CURR_PLAN_TYPE
, ML.MEANING
, P.CURR_ASSIGNMENT_SET_ID
, P.CURR_FULL_PEGGING
, P.PLAN_CAPACITY_FLAG
, D.DEMAND_CLASS
, P.PLAN_COMPLETION_DATE
, P.DATA_COMPLETION_DATE
, D.DESIGNATOR_ID
, P.DAILY_CUTOFF_BUCKET
, P.WEEKLY_CUTOFF_BUCKET
, P.PERIOD_CUTOFF_BUCKET
FROM MSC_DESIGNATORS D
, MSC_PLANS P
, MFG_LOOKUPS ML
WHERE P.ORGANIZATION_ID = D.ORGANIZATION_ID
AND P.SR_INSTANCE_ID = D.SR_INSTANCE_ID
AND P.COMPILE_DESIGNATOR = D.DESIGNATOR
AND P.PLAN_COMPLETION_DATE IS NOT NULL
AND P.DATA_COMPLETION_DATE IS NOT NULL
AND P.PLAN_ID <> -1
AND ML.LOOKUP_TYPE = 'MSC_PLAN_TYPE'
AND ML.LOOKUP_CODE = P.CURR_PLAN_TYPE
AND NVL(P.COPY_PLAN_ID
, -1) = -1
AND NVL(D.COPY_DESIGNATOR_ID
, -1) = -1