DBA Data[Home] [Help]

APPS.MTH_PROCESS_STATUS_PKG dependencies on MTH_EQUIPMENTS_D

Line 921: FROM mth_equipments_d med,

917: -- Validation for invalid equipment
918: UPDATE mth_equip_statuses_stg stg
919: SET stg.err_code = stg.err_code || 'EQP '
920: WHERE NOT EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
921: FROM mth_equipments_d med,
922: mth_equip_statuses_stg stg
923: WHERE med.equipment_pk = stg.equipment_fk) eqp
924: WHERE eqp.equipment_pk = stg.equipment_fk
925: AND stg.processing_flag = v_processing_flag);

Line 932: FROM mth_equipments_d med,

928: -- Validation for Inactive equipment
929: UPDATE mth_equip_statuses_stg stg
930: SET stg.err_code = stg.err_code || 'IEQ '
931: WHERE EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
932: FROM mth_equipments_d med,
933: mth_equip_statuses_stg stg
934: WHERE med.equipment_pk = stg.equipment_fk
935: AND med.status <> 'ACTIVE') eqp
936: WHERE eqp.equipment_pk = stg.equipment_fk

Line 958: FROM mth_equipments_d mee,

954: UPDATE mth_equip_statuses_stg stg
955: SET stg.err_code = stg.err_code || 'ESD '
956: WHERE NOT EXISTS ( SELECT * FROM
957: ( SELECT mee.equipment_pk, mws.shift_workday_pk
958: FROM mth_equipments_d mee,
959: mth_equipment_shifts_d med,
960: mth_workday_shifts_d mws
961: WHERE mee.equipment_pk_key = med.equipment_fk_key
962: AND med.shift_workday_fk_key = mws.shift_workday_pk_key

Line 976: FROM mth_equipments_d med,

972: AND stg.shift_workday_fk IS NOT NULL) wds
973: WHERE wds.shift_workday_pk = stg.shift_workday_fk
974: AND stg.processing_flag = v_processing_flag)
975: AND EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
976: FROM mth_equipments_d med,
977: mth_equip_statuses_stg stg
978: WHERE med.equipment_pk = stg.equipment_fk) eqp
979: WHERE eqp.equipment_pk = stg.equipment_fk
980: AND stg.processing_flag = v_processing_flag);

Line 1142: mth_equipments_d med

1138: SELECT mds.shift_workday_pk,med.equipment_pk,mes.from_date,mes.To_Date
1139: FROM mth_workday_shifts_d mds,
1140: mth_equip_statuses_stg stg,
1141: mth_equipment_shifts_d mes,
1142: mth_equipments_d med
1143: WHERE stg.shift_workday_fk = mds.shift_workday_pk
1144: AND stg.equipment_fk = med.equipment_pk
1145: AND mds.shift_workday_pk_key = mes.shift_workday_fk_key
1146: AND med.equipment_pk_key = mes.equipment_fk_key

Line 1166: mth_equipments_d med

1162: SELECT mds.shift_workday_pk,med.equipment_pk,mes.from_date,mes.To_Date
1163: FROM mth_workday_shifts_d mds,
1164: mth_equip_statuses_stg stg,
1165: mth_equipment_shifts_d mes,
1166: mth_equipments_d med
1167: WHERE stg.shift_workday_fk = mds.shift_workday_pk
1168: AND stg.equipment_fk = med.equipment_pk
1169: AND mds.shift_workday_pk_key = mes.shift_workday_fk_key
1170: AND med.equipment_pk_key = mes.equipment_fk_key

Line 1207: mth_equipments_d med

1203: med.equipment_pk,
1204: stg.from_date,
1205: stg.to_date
1206: FROM mth_equip_statuses_stg stg,
1207: mth_equipments_d med
1208: WHERE stg.equipment_fk = med.equipment_pk
1209: AND stg.processing_flag = v_processing_flag) ovp
1210: WHERE ovp.overlap = 1
1211: AND stag.equipment_fk = ovp.equipment_pk

Line 1235: mth_equipments_d med,

1231: stg.from_date,
1232: stg.to_date
1233: FROM mth_equip_statuses_stg stg,
1234: mth_equip_statuses sts,
1235: mth_equipments_d med,
1236: mth_workday_shifts_d wds
1237: WHERE stg.equipment_fk = med.equipment_pk
1238: AND stg.shift_workday_fk = wds.shift_workday_pk
1239: AND med.equipment_pk_key = sts.equipment_fk_key

Line 1256: mth_equipments_d med

1252: WHERE NOT EXISTS ( SELECT *
1253: FROM (SELECT stg.*
1254: FROM mth_equip_statuses_stg stg,
1255: MTH_EQUIPMENT_REASON_SETUP mer,
1256: mth_equipments_d med
1257: WHERE stg.equipment_fk = med.equipment_pk
1258: AND med.equipment_pk_key = mer.equipment_fk_key
1259: AND stg.downtime_reason_code = mer.reason_code
1260: AND stg.status IN (3,2)

Line 1400: mth_equipments_d med,

1396: null,
1397: mhd.HOUR_PK_KEY,
1398: stg.from_date
1399: FROM mth_equip_statuses_stg stg,
1400: mth_equipments_d med,
1401: mth_workday_shifts_d wds,
1402: mth_systems_setup mss,
1403: mth_user_dim_entities_mst mue1,
1404: mth_user_dim_entities_mst mue2,

Line 1458: mth_equipments_d med,

1454: null,
1455: mhd.HOUR_PK_KEY,
1456: stg.from_date
1457: FROM mth_equip_statuses_stg stg,
1458: mth_equipments_d med,
1459: mth_workday_shifts_d wds,
1460: mth_systems_setup mss,
1461: mth_user_dim_entities_mst mue1,
1462: mth_user_dim_entities_mst mue2,

Line 1519: FROM mth_equipments_d

1515: AND sts.status = stg.status
1516: AND stg.status = 3
1517: AND stg.processing_flag = v_processing_flag
1518: AND sts.equipment_fk_key IN ( SELECT equipment_pk_key
1519: FROM mth_equipments_d
1520: WHERE equipment_pk = stg.equipment_fk )
1521: AND stg.err_code IS NULL
1522: UNION
1523: SELECT 3 reason_type,

Line 1544: FROM mth_equipments_d

1540: AND sts.status = stg.status
1541: AND stg.status = 2
1542: AND stg.processing_flag = v_processing_flag
1543: AND sts.equipment_fk_key IN ( SELECT equipment_pk_key
1544: FROM mth_equipments_d
1545: WHERE equipment_pk = stg.equipment_fk )
1546: AND stg.err_code IS NULL
1547: );
1548:

Line 1661: FROM mth_equipments_d med,

1657: -- Validation for invalid equipment
1658: UPDATE mth_equip_statuses_stg stg
1659: SET stg.err_code = stg.err_code || 'EQP '
1660: WHERE NOT EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
1661: FROM mth_equipments_d med,
1662: mth_equip_statuses_stg stg
1663: WHERE med.equipment_pk = stg.equipment_fk) eqp
1664: WHERE eqp.equipment_pk = stg.equipment_fk
1665: AND stg.processing_flag = v_processing_flag);

Line 1672: FROM mth_equipments_d med,

1668: -- Validation for Inactive equipment
1669: UPDATE mth_equip_statuses_stg stg
1670: SET stg.err_code = stg.err_code || 'IEQ '
1671: WHERE EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
1672: FROM mth_equipments_d med,
1673: mth_equip_statuses_stg stg
1674: WHERE med.equipment_pk = stg.equipment_fk
1675: AND med.status <> 'ACTIVE') eqp
1676: WHERE eqp.equipment_pk = stg.equipment_fk

Line 1698: FROM mth_equipments_d mee,

1694: UPDATE mth_equip_statuses_stg stg
1695: SET stg.err_code = stg.err_code || 'ESD '
1696: WHERE NOT EXISTS ( SELECT * FROM
1697: ( SELECT mee.equipment_pk, mws.shift_workday_pk
1698: FROM mth_equipments_d mee,
1699: mth_equipment_shifts_d med,
1700: mth_workday_shifts_d mws
1701: WHERE mee.equipment_pk_key = med.equipment_fk_key
1702: AND med.shift_workday_fk_key = mws.shift_workday_pk_key

Line 1716: FROM mth_equipments_d med,

1712: AND stg.shift_workday_fk IS NOT NULL
1713: AND stg.processing_flag = v_processing_flag) wds
1714: WHERE wds.shift_workday_pk = stg.shift_workday_fk )
1715: AND EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
1716: FROM mth_equipments_d med,
1717: mth_equip_statuses_stg stg
1718: WHERE med.equipment_pk = stg.equipment_fk) eqp
1719: WHERE eqp.equipment_pk = stg.equipment_fk
1720: AND stg.processing_flag = v_processing_flag);

Line 1882: mth_equipments_d med

1878: SELECT mds.shift_workday_pk,med.equipment_pk,mes.from_date,mes.To_Date
1879: FROM mth_workday_shifts_d mds,
1880: mth_equip_statuses_stg stg,
1881: mth_equipment_shifts_d mes,
1882: mth_equipments_d med
1883: WHERE stg.shift_workday_fk = mds.shift_workday_pk
1884: AND stg.equipment_fk = med.equipment_pk
1885: AND mds.shift_workday_pk_key = mes.shift_workday_fk_key
1886: AND med.equipment_pk_key = mes.equipment_fk_key

Line 1906: mth_equipments_d med

1902: SELECT mds.shift_workday_pk,med.equipment_pk,mes.from_date,mes.To_Date
1903: FROM mth_workday_shifts_d mds,
1904: mth_equip_statuses_stg stg,
1905: mth_equipment_shifts_d mes,
1906: mth_equipments_d med
1907: WHERE stg.shift_workday_fk = mds.shift_workday_pk
1908: AND stg.equipment_fk = med.equipment_pk
1909: AND mds.shift_workday_pk_key = mes.shift_workday_fk_key
1910: AND med.equipment_pk_key = mes.equipment_fk_key

Line 1947: mth_equipments_d med

1943: med.equipment_pk,
1944: stg.from_date,
1945: stg.to_date
1946: FROM mth_equip_statuses_stg stg,
1947: mth_equipments_d med
1948: WHERE stg.equipment_fk = med.equipment_pk
1949: AND stg.processing_flag = v_processing_flag) ovp
1950: WHERE ovp.overlap = 1
1951: AND stag.equipment_fk = ovp.equipment_pk

Line 1975: mth_equipments_d med,

1971: stg.from_date,
1972: stg.to_date
1973: FROM mth_equip_statuses_stg stg,
1974: mth_equip_statuses sts,
1975: mth_equipments_d med,
1976: mth_workday_shifts_d wds
1977: WHERE stg.equipment_fk = med.equipment_pk
1978: AND stg.shift_workday_fk = wds.shift_workday_pk
1979: AND med.equipment_pk_key = sts.equipment_fk_key

Line 1996: mth_equipments_d med

1992: WHERE NOT EXISTS ( SELECT *
1993: FROM (SELECT stg.*
1994: FROM mth_equip_statuses_stg stg,
1995: MTH_EQUIPMENT_REASON_SETUP mer,
1996: mth_equipments_d med
1997: WHERE stg.equipment_fk = med.equipment_pk
1998: AND med.equipment_pk_key = mer.equipment_fk_key
1999: AND stg.downtime_reason_code = mer.reason_code
2000: AND stg.status IN (3,2)

Line 2104: mth_equipments_d med,

2100: v_unassigned_val unassigned_val,
2101: mhd.HOUR_PK_KEY hour_fk_key,
2102: stg.from_date reading_time
2103: FROM mth_equip_statuses_stg stg,
2104: mth_equipments_d med,
2105: mth_workday_shifts_d wds,
2106: mth_systems_setup mss,
2107: mth_user_dim_entities_mst mue1,
2108: mth_user_dim_entities_mst mue2,

Line 2155: mth_equipments_d med,

2151: v_unassigned_val unassigned_val,
2152: mhd.HOUR_PK_KEY hour_fk_key,
2153: stg.from_date reading_time
2154: FROM mth_equip_statuses_stg stg,
2155: mth_equipments_d med,
2156: mth_workday_shifts_d wds,
2157: mth_systems_setup mss,
2158: mth_user_dim_entities_mst mue1,
2159: mth_user_dim_entities_mst mue2,

Line 2293: FROM mth_equipments_d

2289: AND sts.status = stg.status
2290: AND stg.status = 3
2291: AND stg.processing_flag = v_processing_flag
2292: AND sts.equipment_fk_key IN ( SELECT equipment_pk_key
2293: FROM mth_equipments_d
2294: WHERE equipment_pk = stg.equipment_fk )
2295: AND stg.err_code IS NULL
2296: UNION
2297: SELECT 3 reason_type,

Line 2314: FROM mth_equipments_d

2310: AND sts.status = stg.status
2311: AND stg.status = 2
2312: AND stg.processing_flag = v_processing_flag
2313: AND sts.equipment_fk_key IN ( SELECT equipment_pk_key
2314: FROM mth_equipments_d
2315: WHERE equipment_pk = stg.equipment_fk )
2316: AND stg.err_code IS NULL
2317: )subquery
2318: ON ( trr.equipment_fk_key = subquery.equipment_fk_key

Line 2440: FROM mth_equipments_d med,

2436: IF (p_equipment_pk_key is not null)
2437: THEN
2438: SELECT Count(*)
2439: INTO l_count
2440: FROM mth_equipments_d med,
2441: mth_equip_statuses_stg stg
2442: WHERE med.equipment_pk = stg.equipment_fk
2443: AND med.equipment_pk_key = p_equipment_pk_key
2444: AND med.plant_fk_key = Nvl(p_plant_pk_key,med.plant_fk_key);

Line 2458: FROM mth_equipments_d

2454: SELECT Min(from_date)
2455: INTO p_min_from_date_csv
2456: FROM mth_equip_statuses_stg stg
2457: WHERE stg.equipment_fk = Nvl((SELECT equipment_pk
2458: FROM mth_equipments_d
2459: WHERE equipment_pk_key = p_equipment_pk_key),stg.equipment_fk);
2460:
2461: SELECT Max(to_date)
2462: INTO p_max_to_date_csv

Line 2465: FROM mth_equipments_d

2461: SELECT Max(to_date)
2462: INTO p_max_to_date_csv
2463: FROM mth_equip_statuses_stg stg
2464: WHERE stg.equipment_fk = Nvl((SELECT equipment_pk
2465: FROM mth_equipments_d
2466: WHERE equipment_pk_key = p_equipment_pk_key),stg.equipment_fk);
2467:
2468: IF(p_min_from_date_csv > p_recal_from_date OR p_max_to_date_csv < p_recal_to_date)
2469: THEN

Line 2613: FROM mth_equipments_d

2609: FROM mth_equip_statuses
2610: WHERE from_date >= p_recal_from_date
2611: AND nvl(To_Date,sysdate) <= nvl(p_recal_to_date,nvl(To_Date,sysdate))
2612: AND equipment_fk_key IN ( SELECT equipment_pk_key
2613: FROM mth_equipments_d
2614: WHERE plant_fk_key = p_plant_pk_key);
2615: ELSE
2616: DELETE
2617: FROM mth_equip_statuses

Line 2633: FROM mth_equipments_d

2629: WHERE from_date >= p_recal_from_date
2630: AND nvl(To_Date,sysdate) <= nvl(p_recal_to_date,nvl(To_Date,sysdate))
2631: AND reason_type IN (1,3)
2632: AND equipment_fk_key IN ( SELECT equipment_pk_key
2633: FROM mth_equipments_d
2634: WHERE plant_fk_key = p_plant_pk_key);
2635: ELSE
2636: DELETE
2637: FROM mth_tag_reason_readings

Line 2664: FROM mth_equipments_d med,

2660: -- Validation for invalid equipment
2661: UPDATE mth_equip_statuses_stg stg
2662: SET stg.err_code = stg.err_code || 'EQP '
2663: WHERE NOT EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
2664: FROM mth_equipments_d med,
2665: mth_equip_statuses_stg stg
2666: WHERE med.equipment_pk = stg.equipment_fk) eqp
2667: WHERE eqp.equipment_pk = stg.equipment_fk );
2668: mth_util_pkg.log_msg('Number of rows with EQP in MTH_EQUIP_STATUSES_STG - ' || SQL%ROWCOUNT, mth_util_pkg.G_DBG_ROW_CNT);

Line 2674: FROM mth_equipments_d med,

2670: -- Validation for Inactive equipment
2671: UPDATE mth_equip_statuses_stg stg
2672: SET stg.err_code = stg.err_code || 'IEQ '
2673: WHERE EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
2674: FROM mth_equipments_d med,
2675: mth_equip_statuses_stg stg
2676: WHERE med.equipment_pk = stg.equipment_fk
2677: AND med.status <> 'ACTIVE') eqp
2678: WHERE eqp.equipment_pk = stg.equipment_fk );

Line 2698: FROM mth_equipments_d mee,

2694: UPDATE mth_equip_statuses_stg stg
2695: SET stg.err_code = stg.err_code || 'ESD '
2696: WHERE NOT EXISTS ( SELECT * FROM
2697: ( SELECT mee.equipment_pk, mws.shift_workday_pk
2698: FROM mth_equipments_d mee,
2699: mth_equipment_shifts_d med,
2700: mth_workday_shifts_d mws
2701: WHERE mee.equipment_pk_key = med.equipment_fk_key
2702: AND med.shift_workday_fk_key = mws.shift_workday_pk_key

Line 2714: FROM mth_equipments_d med,

2710: WHERE stg.shift_workday_fk = mds.shift_workday_pk(+)
2711: AND stg.shift_workday_fk IS NOT NULL) wds
2712: WHERE wds.shift_workday_pk = stg.shift_workday_fk )
2713: AND EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
2714: FROM mth_equipments_d med,
2715: mth_equip_statuses_stg stg
2716: WHERE med.equipment_pk = stg.equipment_fk) eqp
2717: WHERE eqp.equipment_pk = stg.equipment_fk );
2718: mth_util_pkg.log_msg('Number of rows with ESD in MTH_EQUIP_STATUSES_STG - ' || SQL%ROWCOUNT, mth_util_pkg.G_DBG_ROW_CNT);

Line 2870: mth_equipments_d med

2866: SELECT mds.shift_workday_pk,med.equipment_pk,mes.from_date,mes.To_Date
2867: FROM mth_workday_shifts_d mds,
2868: mth_equip_statuses_stg stg,
2869: mth_equipment_shifts_d mes,
2870: mth_equipments_d med
2871: WHERE stg.shift_workday_fk = mds.shift_workday_pk
2872: AND stg.equipment_fk = med.equipment_pk
2873: AND mds.shift_workday_pk_key = mes.shift_workday_fk_key
2874: AND med.equipment_pk_key = mes.equipment_fk_key

Line 2892: mth_equipments_d med

2888: SELECT mds.shift_workday_pk,med.equipment_pk,mes.from_date,mes.To_Date
2889: FROM mth_workday_shifts_d mds,
2890: mth_equip_statuses_stg stg,
2891: mth_equipment_shifts_d mes,
2892: mth_equipments_d med
2893: WHERE stg.shift_workday_fk = mds.shift_workday_pk
2894: AND stg.equipment_fk = med.equipment_pk
2895: AND mds.shift_workday_pk_key = mes.shift_workday_fk_key
2896: AND med.equipment_pk_key = mes.equipment_fk_key

Line 2931: mth_equipments_d med

2927: med.equipment_pk,
2928: stg.from_date,
2929: stg.to_date
2930: FROM mth_equip_statuses_stg stg,
2931: mth_equipments_d med
2932: WHERE stg.equipment_fk = med.equipment_pk ) ovp
2933: WHERE ovp.overlap = 1
2934: AND stag.equipment_fk = ovp.equipment_pk
2935: AND stag.from_date = ovp.from_date

Line 2957: mth_equipments_d med,

2953: stg.from_date,
2954: stg.to_date
2955: FROM mth_equip_statuses_stg stg,
2956: mth_equip_statuses sts,
2957: mth_equipments_d med,
2958: mth_workday_shifts_d wds
2959: WHERE stg.equipment_fk = med.equipment_pk
2960: AND stg.shift_workday_fk = wds.shift_workday_pk
2961: AND med.equipment_pk_key = sts.equipment_fk_key

Line 2976: mth_equipments_d med

2972: WHERE NOT EXISTS ( SELECT *
2973: FROM (SELECT stg.*
2974: FROM mth_equip_statuses_stg stg,
2975: MTH_EQUIPMENT_REASON_SETUP mer,
2976: mth_equipments_d med
2977: WHERE stg.equipment_fk = med.equipment_pk
2978: AND med.equipment_pk_key = mer.equipment_fk_key
2979: AND stg.downtime_reason_code = mer.reason_code
2980: AND stg.status IN (3,2)

Line 3138: mth_equipments_d med,

3134: null,
3135: mhd.HOUR_PK_KEY,
3136: stg.from_date
3137: FROM mth_equip_statuses_stg stg,
3138: mth_equipments_d med,
3139: mth_workday_shifts_d wds,
3140: mth_systems_setup mss,
3141: mth_user_dim_entities_mst mue1,
3142: mth_user_dim_entities_mst mue2,

Line 3195: mth_equipments_d med,

3191: null,
3192: mhd.HOUR_PK_KEY,
3193: stg.from_date
3194: FROM mth_equip_statuses_stg stg,
3195: mth_equipments_d med,
3196: mth_workday_shifts_d wds,
3197: mth_systems_setup mss,
3198: mth_user_dim_entities_mst mue1,
3199: mth_user_dim_entities_mst mue2,

Line 3255: FROM mth_equipments_d

3251: WHERE stg.from_date = sts.reading_time
3252: AND sts.status = stg.status
3253: AND stg.status = 3
3254: AND sts.equipment_fk_key IN ( SELECT equipment_pk_key
3255: FROM mth_equipments_d
3256: WHERE equipment_pk = stg.equipment_fk )
3257: AND stg.err_code IS NULL
3258: UNION
3259: SELECT 3 reason_type,

Line 3279: FROM mth_equipments_d

3275: WHERE stg.from_date = sts.reading_time
3276: AND sts.status = stg.status
3277: AND stg.status = 2
3278: AND sts.equipment_fk_key IN ( SELECT equipment_pk_key
3279: FROM mth_equipments_d
3280: WHERE equipment_pk = stg.equipment_fk )
3281: AND stg.err_code IS NULL
3282: );
3283: mth_util_pkg.log_msg('Number of rows inserted in MTH_TAG_REASON_READINGS - ' || SQL%ROWCOUNT, mth_util_pkg.G_DBG_ROW_CNT);

Line 3642: mth_equipments_d eq

3638: SELECT Min(from_time)
3639: FROM mth_hour_d
3640: WHERE (SELECT Min(from_date) reading_time
3641: FROM mth_equip_statuses_stg stg,
3642: mth_equipments_d eq
3643: WHERE stg.equipment_fk = eq.equipment_pk
3644: AND eq.equipment_pk_key = nvl(p_recalc_equip_key,eq.equipment_pk_key)
3645: AND eq.equipment_pk_key IN (SELECT equipment_pk_key
3646: FROM mth_equipments_d

Line 3646: FROM mth_equipments_d

3642: mth_equipments_d eq
3643: WHERE stg.equipment_fk = eq.equipment_pk
3644: AND eq.equipment_pk_key = nvl(p_recalc_equip_key,eq.equipment_pk_key)
3645: AND eq.equipment_pk_key IN (SELECT equipment_pk_key
3646: FROM mth_equipments_d
3647: WHERE plant_fk_key = Nvl(p_recalc_plant_key,plant_fk_key))
3648: GROUP BY eq.equipment_pk_key )
3649: BETWEEN from_time AND to_time;
3650:

Line 3666: mth_equipments_d eq

3662: SELECT Max(to_time)
3663: FROM mth_hour_d
3664: WHERE (SELECT Max(to_date) reading_time
3665: FROM mth_equip_statuses_stg stg,
3666: mth_equipments_d eq
3667: WHERE stg.equipment_fk = eq.equipment_pk
3668: AND eq.equipment_pk_key = nvl(p_recalc_equip_key,eq.equipment_pk_key)
3669: AND eq.equipment_pk_key IN (SELECT equipment_pk_key
3670: FROM mth_equipments_d

Line 3670: FROM mth_equipments_d

3666: mth_equipments_d eq
3667: WHERE stg.equipment_fk = eq.equipment_pk
3668: AND eq.equipment_pk_key = nvl(p_recalc_equip_key,eq.equipment_pk_key)
3669: AND eq.equipment_pk_key IN (SELECT equipment_pk_key
3670: FROM mth_equipments_d
3671: WHERE plant_fk_key = Nvl(p_recalc_plant_key,plant_fk_key))
3672: GROUP BY eq.equipment_pk_key )
3673: BETWEEN from_time AND to_time;
3674:

Line 3742: FROM mth_equipments_d

3738: WHERE from_time >= p_n_recalc_from_date
3739: AND to_time <= p_n_recalc_to_date)
3740: AND equipment_fk_key = nvl(p_recalc_equip_key,equipment_fk_key)
3741: AND equipment_fk_key IN (SELECT equipment_pk_key
3742: FROM mth_equipments_d
3743: WHERE plant_fk_key = Nvl(p_recalc_plant_key,plant_fk_key));
3744: END IF;
3745:
3746: -- Call the logging API to log the number of rows inserted

Line 3799: FROM mth_equipments_d

3795: WHERE from_time >= p_n_recalc_from_date
3796: AND to_time <= p_n_recalc_to_date)
3797: AND eqsts.equipment_fk_key = nvl(p_recalc_equip_key,eqsts.equipment_fk_key)
3798: AND eqsts.equipment_fk_key IN (SELECT equipment_pk_key
3799: FROM mth_equipments_d
3800: WHERE plant_fk_key = Nvl(p_recalc_plant_key,plant_fk_key))
3801: AND med.level9_level_key = mrc.resource_fk_key(+)
3802: GROUP BY eqsts.equipment_fk_key,
3803: eqsts.shift_workday_fk_key,