Oracle EBS-SQL (MRP-6):检查MRP计划运行报错原因之超大数据查询1.sql

/*逐一运行检查计划运行超大数据*/

----------------------------------------------------

/*查询-1*/

select  plan_id,

'CUMULATIVE_TOTAL_LEAD_TIME',

min(CUMULATIVE_TOTAL_LEAD_TIME),

max(CUMULATIVE_TOTAL_LEAD_TIME)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-2*/

select  plan_id,

'CUM_MANUFACTURING_LEAD_TIME',

min(CUM_MANUFACTURING_LEAD_TIME),

max(CUM_MANUFACTURING_LEAD_TIME)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-3*/

select  plan_id,

'DMD_LATENESS_COST',

min(DMD_LATENESS_COST),

max(DMD_LATENESS_COST)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-4*/

select  plan_id,

'FIXED_DAYS_SUPPLY',

min(FIXED_DAYS_SUPPLY),

max(FIXED_DAYS_SUPPLY)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-5*/

select  plan_id,

'FIXED_LEAD_TIME',

min(FIXED_LEAD_TIME),

max(FIXED_LEAD_TIME)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-6*/

select  plan_id,

'FIXED_LOT_MULTIPLIER',

min(FIXED_LOT_MULTIPLIER),

max(FIXED_LOT_MULTIPLIER)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-7*/

select  plan_id,

'FIXED_ORDER_QUANTITY',

min(FIXED_ORDER_QUANTITY),

max(FIXED_ORDER_QUANTITY)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-8*/

select  plan_id,

'FULL_LEAD_TIME',

min(FULL_LEAD_TIME),

max(FULL_LEAD_TIME)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-9*/

select  plan_id,

'MAXIMUM_ORDER_QUANTITY',

min(MAXIMUM_ORDER_QUANTITY),

max(MAXIMUM_ORDER_QUANTITY)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-10*/

select  plan_id,

'MINIMUM_ORDER_QUANTITY',

min(MINIMUM_ORDER_QUANTITY),

max(MINIMUM_ORDER_QUANTITY)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-11*/

select  plan_id,

'PLANNING_TIME_FENCE_DAYS',

min(PLANNING_TIME_FENCE_DAYS),

max(PLANNING_TIME_FENCE_DAYS)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-12*/

select  plan_id,

'POSTPROCESSING_LEAD_TIME',

min(POSTPROCESSING_LEAD_TIME),

max(POSTPROCESSING_LEAD_TIME)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-13*/

select  plan_id,

'PREPROCESSING_LEAD_TIME',

min(PREPROCESSING_LEAD_TIME),

max(PREPROCESSING_LEAD_TIME)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-14*/

select  plan_id,

'SAFETY_STOCK_BUCKET_DAYS',

min(SAFETY_STOCK_BUCKET_DAYS),

max(SAFETY_STOCK_BUCKET_DAYS)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-15*/

select  plan_id,

'SAFETY_STOCK_PERCENT',

min(SAFETY_STOCK_PERCENT),

max(SAFETY_STOCK_PERCENT)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-16*/

select  plan_id,

'RELEASE_TIME_FENCE_DAYS',

min(RELEASE_TIME_FENCE_DAYS),

max(RELEASE_TIME_FENCE_DAYS)

from msc_system_items

where plan_id = X

group by plan_id

union

----------------------------------------------------

/*查询-17*/

SELECT  plan_id,

'supplier_cap_overutil_cost',

MIN(supplier_cap_overutil_cost),

MAX(supplier_cap_overutil_cost)

FROM  msc_system_items

WHERE plan_id = X

GROUP BY plan_id

UNION

----------------------------------------------------

/*查询-18*/

SELECT  plan_id,

'VARIABLE_LEAD_TIME',

MIN(VARIABLE_LEAD_TIME),

MAX(VARIABLE_LEAD_TIME)

FROM  msc_system_items

WHERE plan_id = X

GROUP BY plan_id

----------------------------------------------------

/*查询-19*/

select FULL_LEAD_TIME

from msc_system_items

where plan_id = X

group by plan_id

union

上一篇:git的0基础使用


下一篇:linq 跨库查询