622: INSERT /*+ APPEND */ INTO isc_dbi_fte_curr_rates
623: (TRX_CURRENCY_CODE, WH_CURRENCY_CODE, CONVERSION_DATE, CONVERSION_TYPE_CODE, TRX_WH_RATE, WH_PRIM_RATE, WH_SEC_RATE)
624: SELECT trx_currency_code, wh_currency_code, conversion_date, conversion_type_code,
625: decode(trx_currency_code, wh_currency_code, 1,
626: fii_currency.get_rate(trx_currency_code, wh_currency_code, conversion_date, conversion_type_code)) TRX_WH_RATE,
627: decode(g_global_currency, trx_currency_code, 1, wh_currency_code, 1,
628: fii_currency.get_global_rate_primary(wh_currency_code, conversion_date)) WH_PRIM_RATE,
629: decode(g_sec_global_currency, trx_currency_code, 1, wh_currency_code, 1,
630: fii_currency.get_global_rate_secondary(wh_currency_code, conversion_date)) WH_SEC_RATE
624: SELECT trx_currency_code, wh_currency_code, conversion_date, conversion_type_code,
625: decode(trx_currency_code, wh_currency_code, 1,
626: fii_currency.get_rate(trx_currency_code, wh_currency_code, conversion_date, conversion_type_code)) TRX_WH_RATE,
627: decode(g_global_currency, trx_currency_code, 1, wh_currency_code, 1,
628: fii_currency.get_global_rate_primary(wh_currency_code, conversion_date)) WH_PRIM_RATE,
629: decode(g_sec_global_currency, trx_currency_code, 1, wh_currency_code, 1,
630: fii_currency.get_global_rate_secondary(wh_currency_code, conversion_date)) WH_SEC_RATE
631: FROM (SELECT /*+ PARALLEL(idl) */
632: distinct trx_currency_code, wh_currency_code, conversion_date CONVERSION_DATE, conversion_type_code CONVERSION_TYPE_CODE
626: fii_currency.get_rate(trx_currency_code, wh_currency_code, conversion_date, conversion_type_code)) TRX_WH_RATE,
627: decode(g_global_currency, trx_currency_code, 1, wh_currency_code, 1,
628: fii_currency.get_global_rate_primary(wh_currency_code, conversion_date)) WH_PRIM_RATE,
629: decode(g_sec_global_currency, trx_currency_code, 1, wh_currency_code, 1,
630: fii_currency.get_global_rate_secondary(wh_currency_code, conversion_date)) WH_SEC_RATE
631: FROM (SELECT /*+ PARALLEL(idl) */
632: distinct trx_currency_code, wh_currency_code, conversion_date CONVERSION_DATE, conversion_type_code CONVERSION_TYPE_CODE
633: FROM isc_dbi_tmp_del_legs idl
634: WHERE idl.freight_cost_trx is not null
995: INSERT INTO isc_dbi_fte_curr_rates
996: (TRX_CURRENCY_CODE, WH_CURRENCY_CODE, CONVERSION_DATE, CONVERSION_TYPE_CODE, TRX_WH_RATE, WH_PRIM_RATE, WH_SEC_RATE)
997: SELECT trx_currency_code, wh_currency_code, conversion_date, conversion_type_code,
998: decode(trx_currency_code, wh_currency_code, 1,
999: fii_currency.get_rate(trx_currency_code, wh_currency_code, conversion_date, conversion_type_code)) TRX_WH_RATE,
1000: decode(g_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1001: fii_currency.get_global_rate_primary(wh_currency_code, conversion_date)) WH_PRIM_RATE,
1002: decode(g_sec_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1003: fii_currency.get_global_rate_secondary(wh_currency_code, conversion_date)) WH_SEC_RATE
997: SELECT trx_currency_code, wh_currency_code, conversion_date, conversion_type_code,
998: decode(trx_currency_code, wh_currency_code, 1,
999: fii_currency.get_rate(trx_currency_code, wh_currency_code, conversion_date, conversion_type_code)) TRX_WH_RATE,
1000: decode(g_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1001: fii_currency.get_global_rate_primary(wh_currency_code, conversion_date)) WH_PRIM_RATE,
1002: decode(g_sec_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1003: fii_currency.get_global_rate_secondary(wh_currency_code, conversion_date)) WH_SEC_RATE
1004: FROM (SELECT distinct trx_currency_code, wh_currency_code, conversion_date CONVERSION_DATE, conversion_type_code CONVERSION_TYPE_CODE
1005: FROM isc_dbi_tmp_del_legs idl
999: fii_currency.get_rate(trx_currency_code, wh_currency_code, conversion_date, conversion_type_code)) TRX_WH_RATE,
1000: decode(g_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1001: fii_currency.get_global_rate_primary(wh_currency_code, conversion_date)) WH_PRIM_RATE,
1002: decode(g_sec_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1003: fii_currency.get_global_rate_secondary(wh_currency_code, conversion_date)) WH_SEC_RATE
1004: FROM (SELECT distinct trx_currency_code, wh_currency_code, conversion_date CONVERSION_DATE, conversion_type_code CONVERSION_TYPE_CODE
1005: FROM isc_dbi_tmp_del_legs idl
1006: WHERE idl.freight_cost_trx is not null);
1007:
1169: INSERT INTO isc_dbi_fte_curr_rates
1170: (TRX_CURRENCY_CODE, WH_CURRENCY_CODE, CONVERSION_DATE, CONVERSION_TYPE_CODE, TRX_WH_RATE, WH_PRIM_RATE, WH_SEC_RATE)
1171: SELECT trx_currency_code, wh_currency_code, conversion_date, conversion_type_code,
1172: decode(trx_currency_code, wh_currency_code, 1,
1173: fii_currency.get_rate(trx_currency_code, wh_currency_code, conversion_date, conversion_type_code)) TRX_WH_RATE,
1174: decode(g_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1175: fii_currency.get_global_rate_primary(wh_currency_code, conversion_date)) WH_PRIM_RATE,
1176: decode(g_sec_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1177: fii_currency.get_global_rate_secondary(wh_currency_code, conversion_date)) WH_SEC_RATE
1171: SELECT trx_currency_code, wh_currency_code, conversion_date, conversion_type_code,
1172: decode(trx_currency_code, wh_currency_code, 1,
1173: fii_currency.get_rate(trx_currency_code, wh_currency_code, conversion_date, conversion_type_code)) TRX_WH_RATE,
1174: decode(g_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1175: fii_currency.get_global_rate_primary(wh_currency_code, conversion_date)) WH_PRIM_RATE,
1176: decode(g_sec_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1177: fii_currency.get_global_rate_secondary(wh_currency_code, conversion_date)) WH_SEC_RATE
1178: FROM (SELECT distinct trx_currency_code, wh_currency_code, conversion_date, conversion_type_code CONVERSION_TYPE_CODE
1179: FROM isc_dbi_tmp_fte_invoices);
1173: fii_currency.get_rate(trx_currency_code, wh_currency_code, conversion_date, conversion_type_code)) TRX_WH_RATE,
1174: decode(g_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1175: fii_currency.get_global_rate_primary(wh_currency_code, conversion_date)) WH_PRIM_RATE,
1176: decode(g_sec_global_currency, trx_currency_code, 1, wh_currency_code, 1,
1177: fii_currency.get_global_rate_secondary(wh_currency_code, conversion_date)) WH_SEC_RATE
1178: FROM (SELECT distinct trx_currency_code, wh_currency_code, conversion_date, conversion_type_code CONVERSION_TYPE_CODE
1179: FROM isc_dbi_tmp_fte_invoices);
1180:
1181: FII_UTIL.Stop_Timer;