DBA Data[Home] [Help]

APPS.MSD_VALIDATE_DEMAND_PLAN dependencies on MSD_TIME

Line 243: FROM msd_time dp

239: --
240: CURSOR get_tim(p_calendar_type VARCHAR2, p_calendar_code VARCHAR2,
241: p_start_date DATE, p_end_date DATE) IS
242: SELECT MIN(day) min_date, MAX(day) max_date
243: FROM msd_time dp
244: WHERE dp.calendar_type = p_calendar_type
245: AND dp.calendar_code = p_calendar_code
246: AND day between p_start_date and p_end_date;
247:

Line 765: FROM msd_time mtv, msd_dp_calendars mdc

761: p_demand_plan_id IN NUMBER,
762: p_field_name IN VARCHAR2) IS
763: CURSOR C1 IS
764: SELECT count(1)
765: FROM msd_time mtv, msd_dp_calendars mdc
766: WHERE mtv.day = p_date
767: AND rownum = 1
768: AND mtv.calendar_type = mdc.calendar_type
769: AND mtv.calendar_code = mdc.calendar_code

Line 2089: /* Translate Time Level Id into Time Column in MSD_TIME */

2085: from msd_cs_defn_dim_dtls
2086: where cs_definition_id = p_cs_definition_id
2087: and dimension_code = p_dim_code;
2088:
2089: /* Translate Time Level Id into Time Column in MSD_TIME */
2090: cursor tim_lvl_id_2_clmn (p_lvl_id in number) is
2091: select decode(p_lvl_id,
2092: '1', 'WEEK_END_DATE ',
2093: '2', 'MONTH_END_DATE ',

Line 2299: /* BUG 2419958 : Add clause to check that data exists in msd_time_v too.

2295: If (x_stream_type <> 'LOCAL') then
2296: l_stmt := l_stmt || ' AND src.action_code <> ''D''';
2297: End IF;
2298:
2299: /* BUG 2419958 : Add clause to check that data exists in msd_time_v too.
2300: * Retrieve the end_date and level_id to find out a row in time and fact that match.
2301: */
2302: l_stmt := l_stmt || ' AND EXISTS (select 1 from msd_time tim where src.';
2303: l_stmt := l_stmt || l_date_col || ' = tim.' || nvl(time_level_column, 'DAY');

Line 2302: l_stmt := l_stmt || ' AND EXISTS (select 1 from msd_time tim where src.';

2298:
2299: /* BUG 2419958 : Add clause to check that data exists in msd_time_v too.
2300: * Retrieve the end_date and level_id to find out a row in time and fact that match.
2301: */
2302: l_stmt := l_stmt || ' AND EXISTS (select 1 from msd_time tim where src.';
2303: l_stmt := l_stmt || l_date_col || ' = tim.' || nvl(time_level_column, 'DAY');
2304:
2305: l_stmt := l_stmt || ' and (tim.calendar_type, tim.calendar_code) in (select mdc.calendar_type, mdc.calendar_code from msd_dp_calendars mdc where mdc.demand_plan_id = ' || p_demand_plan_id || ')';
2306: l_stmt := l_stmt || ' and ' || time_cal_type || ' = tim.calendar_type)';

Line 2660: l_stmt := l_stmt || ' from msd_time ';

2656: fetch c2 into p_date_clmn;
2657: close c2;
2658:
2659: l_stmt := 'SELECT ' || p_date_clmn;
2660: l_stmt := l_stmt || ' from msd_time ';
2661: l_stmt := l_stmt || ' where calendar_type = ' || p_calendar_type;
2662: l_stmt := l_stmt || ' and calendar_code in ';
2663: l_stmt := l_stmt || '(SELECT calendar_code FROM msd_dp_calendars';
2664: l_stmt := l_stmt || ' WHERE demand_plan_id = ' || p_demand_plan_id;