16: /* Solving Perf. Bug 4191046 */
17: /* The following delete and update statements are commented out */
18: /* as a quick workaround to fix the time-consuming table handler issue */
19: /*
20: delete from EGO_MTL_SY_ITEMS_EXT_TL T
21: where not exists
22: (select NULL
23: from EGO_MTL_SY_ITEMS_EXT_B B
24: where B.EXTENSION_ID = T.EXTENSION_ID
23: from EGO_MTL_SY_ITEMS_EXT_B B
24: where B.EXTENSION_ID = T.EXTENSION_ID
25: );
26:
27: update EGO_MTL_SY_ITEMS_EXT_TL T set (
28: TL_EXT_ATTR1,
29: TL_EXT_ATTR2,
30: TL_EXT_ATTR3,
31: TL_EXT_ATTR4,
106: B.TL_EXT_ATTR37,
107: B.TL_EXT_ATTR38,
108: B.TL_EXT_ATTR39,
109: B.TL_EXT_ATTR40
110: from EGO_MTL_SY_ITEMS_EXT_TL B
111: where B.EXTENSION_ID = T.EXTENSION_ID
112: and B.LANGUAGE = T.SOURCE_LANG)
113: where (
114: T.EXTENSION_ID,
115: T.LANGUAGE
116: ) in (select
117: SUBT.EXTENSION_ID,
118: SUBT.LANGUAGE
119: from EGO_MTL_SY_ITEMS_EXT_TL SUBB, EGO_MTL_SY_ITEMS_EXT_TL SUBT
120: where SUBB.EXTENSION_ID = SUBT.EXTENSION_ID
121: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
122: and (SUBB.TL_EXT_ATTR1 <> SUBT.TL_EXT_ATTR1
123: or (SUBB.TL_EXT_ATTR1 is null and SUBT.TL_EXT_ATTR1 is not null)
240: or (SUBB.TL_EXT_ATTR40 is null and SUBT.TL_EXT_ATTR40 is not null)
241: or (SUBB.TL_EXT_ATTR40 is not null and SUBT.TL_EXT_ATTR40 is null)
242: ));
243: */
244: insert into EGO_MTL_SY_ITEMS_EXT_TL (
245: TL_EXT_ATTR23,
246: TL_EXT_ATTR24,
247: TL_EXT_ATTR25,
248: TL_EXT_ATTR26,
350: B.TL_EXT_ATTR21,
351: B.TL_EXT_ATTR22,
352: L.LANGUAGE_CODE,
353: B.SOURCE_LANG
354: from EGO_MTL_SY_ITEMS_EXT_TL B, FND_LANGUAGES L
355: where L.INSTALLED_FLAG in ('I', 'B')
356: and B.LANGUAGE = userenv('LANG')
357: and not exists
358: (select NULL
355: where L.INSTALLED_FLAG in ('I', 'B')
356: and B.LANGUAGE = userenv('LANG')
357: and not exists
358: (select NULL
359: from EGO_MTL_SY_ITEMS_EXT_TL T
360: where T.EXTENSION_ID = B.EXTENSION_ID
361: and T.LANGUAGE = L.LANGUAGE_CODE);
362: END ADD_LANGUAGE;
363: