4673: is
4674: select fdit.rowid row_id
4675: from ff_globals_f fg,
4676: ff_globals_f_tl fgt,
4677: ff_database_items_tl fdit
4678: where fg.legislation_code = 'JP'
4679: and fg.effective_start_date = (
4680: select max(fg2.effective_start_date)
4681: from ff_globals_f fg2
4689: decode(fgt.global_name,hr_jp_standard_pkg.sjhextochar('478151944E815192E897A68CB890C597A6'),
4690: hr_jp_standard_pkg.sjhextochar('478151944E815192E897A68CB890C597BF97A6'),null))
4691: and not exists(
4692: select null
4693: from ff_database_items fdi
4694: where fdi.user_entity_id = fdit.user_entity_id
4695: and fdi.user_name = fdit.user_name);
4696: --
4697: cursor csr_corrupt_dbi
4700: fdi.user_name,
4701: fdi.description
4702: from ff_globals_f fg,
4703: ff_user_entities fue,
4704: ff_database_items fdi
4705: where fg.legislation_code = 'JP'
4706: and fg.effective_start_date = (
4707: select max(fg2.effective_start_date)
4708: from ff_globals_f fg2
4713: and fdi.user_name = fg.global_name
4714: and fdi.user_entity_id = fue.user_entity_id
4715: and not exists(
4716: select null
4717: from ff_database_items_tl fdit
4718: where fdit.user_entity_id = fdi.user_entity_id
4719: and fdit.user_name = fdit.user_name);
4720: --
4721: l_csr_corrupt_dbi_tl csr_corrupt_dbi_tl%rowtype;
4748: distinct f.formula_id
4749: FROM ff_formulas_f f,
4750: per_business_groups_perf bg,
4751: ff_fdi_usages_f fdu,
4752: ff_database_items fdt,
4753: ff_user_entities fue,
4754: per_business_groups_perf bg2
4755: where (f.legislation_code = 'JP' or f.business_group_id is not null)
4756: and bg.business_group_id(+) = f.business_group_id
4776: distinct f.formula_id
4777: FROM ff_formulas_f f,
4778: per_business_groups_perf bg,
4779: ff_fdi_usages_f fdu,
4780: ff_database_items fdt,
4781: ff_user_entities fue,
4782: per_business_groups_perf bg2
4783: where (f.legislation_code = 'JP' or f.business_group_id is not null)
4784: and bg.business_group_id(+) = f.business_group_id
4851: --
4852: fetch csr_corrupt_dbi_tl into l_csr_corrupt_dbi_tl;
4853: exit when csr_corrupt_dbi_tl%notfound;
4854: --
4855: delete from ff_database_items_tl
4856: where rowid = l_csr_corrupt_dbi_tl.row_id;
4857: --
4858: l_dbi_tl_cnt := l_dbi_tl_cnt + 1;
4859: --
4866: fetch csr_corrupt_dbi into l_csr_corrupt_dbi;
4867: exit when csr_corrupt_dbi%notfound;
4868: --
4869: -- insert for multiple langs, updated translate row in subsequent procedure
4870: ff_database_items_pkg.insert_tl_rows(
4871: x_user_name => l_csr_corrupt_dbi.user_name,
4872: x_user_entity_id => l_csr_corrupt_dbi.user_entity_id,
4873: x_language => userenv('LANG'),
4874: x_translated_user_name => l_csr_corrupt_dbi.user_name,
6731: is
6732: select /*+ ORDERED */
6733: count(fdit.user_name)
6734: from ff_user_entities fue,
6735: ff_database_items fdi,
6736: ff_database_items_tl fdit
6737: where (fue.user_entity_name like 'T_SAL_ITX_DAY1_KOU%'
6738: or fue.user_entity_name like 'T_SAL_ITX_DAY2_KOU%BASIC%')
6739: and fue.legislation_code = 'JP'
6732: select /*+ ORDERED */
6733: count(fdit.user_name)
6734: from ff_user_entities fue,
6735: ff_database_items fdi,
6736: ff_database_items_tl fdit
6737: where (fue.user_entity_name like 'T_SAL_ITX_DAY1_KOU%'
6738: or fue.user_entity_name like 'T_SAL_ITX_DAY2_KOU%BASIC%')
6739: and fue.legislation_code = 'JP'
6740: and fdi.user_entity_id = fue.user_entity_id
6781: if l_corrupt_dbi_tl_cnt > 0 then
6782: --
6783: l_status_mode := hr_general.g_data_migrator_mode;
6784: --
6785: -- for unset FF_DATABASE_ITEMS_TL084714_WHO
6786: if nvl(l_status_mode,'N') <> 'Y' then
6787: --
6788: hr_general.g_data_migrator_mode := 'Y';
6789: --
6788: hr_general.g_data_migrator_mode := 'Y';
6789: --
6790: end if;
6791: --
6792: update ff_database_items_tl ufdit
6793: set ufdit.translated_user_name = ufdit.user_name,
6794: ufdit.last_updated_by = -1,
6795: ufdit.last_update_login = -1,
6796: ufdit.last_update_date = sysdate
6797: where ufdit.rowid in (
6798: select /*+ ORDERD */
6799: fdit.rowid
6800: from ff_user_entities fue,
6801: ff_database_items fdi,
6802: ff_database_items_tl fdit
6803: where (fue.user_entity_name like 'T_SAL_ITX_DAY1_KOU%'
6804: or fue.user_entity_name like 'T_SAL_ITX_DAY2_KOU%BASIC%')
6805: and fue.legislation_code = 'JP'
6798: select /*+ ORDERD */
6799: fdit.rowid
6800: from ff_user_entities fue,
6801: ff_database_items fdi,
6802: ff_database_items_tl fdit
6803: where (fue.user_entity_name like 'T_SAL_ITX_DAY1_KOU%'
6804: or fue.user_entity_name like 'T_SAL_ITX_DAY2_KOU%BASIC%')
6805: and fue.legislation_code = 'JP'
6806: and fdi.user_entity_id = fue.user_entity_id