DBA Data[Home] [Help]

VIEW: APPS.CSP_ENGINEER_DAYS_V

Source

View Text - Preformatted

SELECT cpp.planning_parameters_id, least(max(trunc(sysdate) - trunc(cpp1.creation_date)),cfrb.history_periods * cfrb.period_size) , sum(trunc(sysdate) - trunc(cpp1.creation_date)) from csp_planning_parameters cpp, csp_planning_parameters cpp1, csp_forecast_rules_b cfrb Where cpp.node_type = 'REGION' and cpp1.level_id like cpp.level_id || '%' and cpp1.node_type = 'SUBINVENTORY' and nvl(cpp1.condition_type,'B') = 'G' and cfrb.forecast_rule_id = cpp.forecast_rule_id group by cpp.planning_parameters_id,cfrb.history_periods * cfrb.period_size
View Text - HTML Formatted

SELECT CPP.PLANNING_PARAMETERS_ID
, LEAST(MAX(TRUNC(SYSDATE) - TRUNC(CPP1.CREATION_DATE))
, CFRB.HISTORY_PERIODS * CFRB.PERIOD_SIZE)
, SUM(TRUNC(SYSDATE) - TRUNC(CPP1.CREATION_DATE))
FROM CSP_PLANNING_PARAMETERS CPP
, CSP_PLANNING_PARAMETERS CPP1
, CSP_FORECAST_RULES_B CFRB
WHERE CPP.NODE_TYPE = 'REGION'
AND CPP1.LEVEL_ID LIKE CPP.LEVEL_ID || '%'
AND CPP1.NODE_TYPE = 'SUBINVENTORY'
AND NVL(CPP1.CONDITION_TYPE
, 'B') = 'G'
AND CFRB.FORECAST_RULE_ID = CPP.FORECAST_RULE_ID GROUP BY CPP.PLANNING_PARAMETERS_ID
, CFRB.HISTORY_PERIODS * CFRB.PERIOD_SIZE