DBA Data[Home] [Help]

APPS.CE_BANK_GROUPINGS SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 48

       select country, bank_or_branch_number, organization_name, ce_upgrade_id,
              source_application_id, to_char(creation_date,'DD/MM/YYYY')
       from   ce_upg_bank_rec
       where  group_id is null
       and    bank_entity_type = p_bank_entity_type
       order by country, bank_or_branch_number,
                decode(source_application_id, 200, 1, 185, 2),
                creation_date desc;
Line: 59

       select group_id, ce_upgrade_id, known_as
       from   ce_upg_bank_rec
       where  secondary_flag = 'Y'
       and    source_application_id <> 200
       and    bank_entity_type = p_bank_entity_type
       order by group_id, source_application_id;
Line: 68

       select ce_upgrade_id, country, bank_or_branch_number,
              organization_name, jgzz_fiscal_code, organization_name_phonetic
       from   ce_upg_bank_rec
       where  bank_entity_type = p_bank_entity_type
       and    primary_flag = 'Y'
       order by country, bank_or_branch_number, creation_date desc;
Line: 77

       select bb.country, bb.bank_or_branch_number, bb.organization_name,
              bb.ce_upgrade_id, bb.source_application_id,
              to_char(bb.creation_date,'DD/MM/YYYY'), b.group_id
       from   ce_upg_bank_rec b, ce_upg_bank_rec bb
       where  b.ce_upgrade_id = bb.parent_upgrade_id
       and    bb.group_id is null
       and    b.bank_entity_type = 'BANK'
       and    bb.bank_entity_type = p_bank_entity_type
       order by bb.country, b.group_id, bb.bank_or_branch_number,
                decode(bb.source_application_id, 200, 1, 185, 2),
                bb.creation_date desc;
Line: 91

       select group_id, ce_upgrade_id, known_as
       from   ce_upg_bank_rec
       where  secondary_flag = 'Y'
       and    source_application_id <> 200
       and    bank_entity_type = p_bank_entity_type
       order by group_id, source_application_id;
Line: 100

       select bb.ce_upgrade_id, bb.country, bb.bank_or_branch_number,
              b.group_id, bb.organization_name_phonetic
       from   ce_upg_bank_rec b, ce_upg_bank_rec bb
       where  b.bank_entity_type = 'BANK'
       and    b.ce_upgrade_id = bb.parent_upgrade_id
       and    bb.bank_entity_type = p_bank_entity_type
       and    bb.primary_flag = 'Y'
       order by b.group_id, bb.bank_or_branch_number, bb.creation_date desc;
Line: 111

       select bb.country, ba.bank_account_name, ba.bank_account_num,
              ba.currency_code, ba.bank_account_type, ba.ce_upgrade_id,
              ba.source_application_id, to_char(ba.creation_date,'DD/MM/YYYY'),
              bb.group_id
       from   ce_upg_bank_rec bb, ce_upg_bank_accounts ba
       where  bb.ce_upgrade_id = ba.parent_upgrade_id
       and    ba.group_id is null
       and    bb.bank_entity_type = 'BRANCH'
       order by bb.group_id, ba.bank_account_name, ba.bank_account_num,
                ba.currency_code,
                decode(bb.country, 'JP', ba.bank_account_type, 'X'),
                decode(ba.source_application_id, 200, 1, 185, 2, 801, 3),
                ba.creation_date desc;
Line: 127

       select group_id, source_application_id, ce_upgrade_id,
              start_date, legal_account_name, description, xtr_use_allowed_flag,
              pay_use_allowed_flag, xtr_amount_tolerance, xtr_percent_tolerance,
              pay_amount_tolerance, pay_percent_tolerance,
              cashflow_display_order, target_balance
       from   ce_upg_bank_accounts
       where  secondary_acct_flag = 'Y'
       and    source_application_id <> 200
       order by group_id, source_application_id;
Line: 139

       select ba.ce_upgrade_id, bb.country, b.bank_or_branch_number,
              bb.bank_or_branch_number, ba.bank_account_num,
              ba.secondary_account_reference, ba.bank_account_name,
              ba.check_digits, bb.group_id, ba.bank_account_type,
	      ba.account_suffix
       from   ce_upg_bank_rec b, ce_upg_bank_rec bb, ce_upg_bank_accounts ba
       where  b.bank_entity_type = 'BANK'
       and    b.ce_upgrade_id = bb.parent_upgrade_id
       and    bb.bank_entity_type = 'BRANCH'
       and    bb.ce_upgrade_id = ba.parent_upgrade_id
       and    ba.primary_acct_flag = 'Y'
       order by bb.group_id, ba.bank_account_name, ba.bank_account_num,
                ba.creation_date desc;
Line: 155

       select ba.group_id, bau.org_id, bau.legal_entity_id, bau.source_application_id,
              bau.ce_upgrade_id, to_char(ba.creation_date,'DD/MM/YYYY'),
              pay_use_enable_flag, payroll_bank_account_id
       from   ce_upg_bank_accounts ba, ce_upg_ba_uses_all bau
       where  ba.ce_upgrade_id = bau.parent_upgrade_id
       and    bau.group_id is null
       order by ba.group_id, bau.org_id, bau.legal_entity_id,
                decode(bau.source_application_id, 200, 1, 185, 2, 801, 3),
                ba.creation_date desc;
Line: 241

     select 'Y'
     into   c_grouping_flag
     from   ce_bank_upgrade_modes
     where  source_product_name = 'ALL'
     and    decode(p_bank_entity_type, 'BRANCH', bank_upgrade_mode,
              'ACCOUNT', branch_upgrade_mode,'GROUPED') in ('GROUPED','FROZEN')
     and    decode(p_bank_entity_type, 'BANK', bank_upgrade_mode,
             'BRANCH', branch_upgrade_mode, account_upgrade_mode) = 'PRE_GROUP';
Line: 260

         c_country.delete;
Line: 261

         c_bank_or_branch_number.delete;
Line: 262

         c_org_name.delete;
Line: 263

         c_upg_id.delete;
Line: 264

         c_app_id.delete;
Line: 265

         c_creation_date.delete;
Line: 279

             update ce_upg_bank_rec b
             set    group_id = c_upg_id(i),
                    primary_flag = 'Y',
                    secondary_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number = c_bank_or_branch_number(i)
             and   bank_entity_type = p_bank_entity_type
             and   bank_or_branch_number is not null
             and   ce_upgrade_id = c_upg_id(i)
             and   not exists
                  (select null from ce_upg_bank_rec
                   where  country = b.country
                   and    bank_or_branch_number = b.bank_or_branch_number
                   and    bank_entity_type = b.bank_entity_type
                   and    primary_flag = 'Y'
                   union all
                   select null from ce_upg_bank_rec
                   where  country = b.country
                   and    bank_or_branch_number is null
                   and    organization_name = b.organization_name
                   and    bank_entity_type = b.bank_entity_type
                   and    primary_flag = 'Y');
Line: 306

             update ce_upg_bank_rec b
             set    group_id = nvl(
                     (select group_id from ce_upg_bank_rec
                      where  country = b.country
                      and    bank_or_branch_number = b.bank_or_branch_number
                      and    bank_entity_type = b.bank_entity_type
                      and    source_application_id <> b.source_application_id
                      and    primary_flag = 'Y'
                      and    rownum = 1),
                     (select group_id from ce_upg_bank_rec
                      where  country = b.country
                      and    bank_or_branch_number is null
                      and    organization_name = b.organization_name
                      and    bank_entity_type = b.bank_entity_type
                      and    source_application_id <> b.source_application_id
                      and    primary_flag = 'Y'
                      and    rownum = 1)),
                    primary_flag = 'N',
                    secondary_flag = 'Y',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number = c_bank_or_branch_number(i)
             and   bank_or_branch_number is not null
             and   bank_entity_type = p_bank_entity_type
             and   ce_upgrade_id = c_upg_id(i)
             and   group_id is null
             and   not exists
                  (select null from ce_upg_bank_rec
                   where  country = b.country
                   and    bank_or_branch_number = b.bank_or_branch_number
                   and    bank_entity_type = b.bank_entity_type
                   and    source_application_id = b.source_application_id
                   and    group_id is not null
                   union all
                   select null from ce_upg_bank_rec
                   where  country = b.country
                   and    bank_or_branch_number is null
                   and    organization_name = b.organization_name
                   and    bank_entity_type = b.bank_entity_type
                   and    source_application_id = b.source_application_id
                   and    group_id is not null)
             and   exists
                  (select null from ce_upg_bank_rec
                   where  country = b.country
                   and    bank_or_branch_number = b.bank_or_branch_number
                   and    bank_entity_type = b.bank_entity_type
                   and    primary_flag = 'Y'
                   union all
                   select null from ce_upg_bank_rec
                   where  country = b.country
                   and    bank_or_branch_number is null
                   and    organization_name = b.organization_name
                   and    bank_entity_type = b.bank_entity_type
                   and    primary_flag = 'Y');
Line: 364

             update ce_upg_bank_rec b
             set    group_id = nvl(
                     (select group_id from ce_upg_bank_rec
                      where  country = b.country
                      and    bank_or_branch_number = b.bank_or_branch_number
                      and    bank_entity_type = b.bank_entity_type
                      and    primary_flag = 'Y'
                      and    rownum = 1),
                     (select group_id from ce_upg_bank_rec
                      where  country = b.country
                      and    bank_or_branch_number is null
                      and    organization_name = b.organization_name
                      and    bank_entity_type = b.bank_entity_type
                      and    primary_flag = 'Y'
                      and    rownum = 1)),
                    primary_flag = 'N',
                    secondary_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number = c_bank_or_branch_number(i)
             and   bank_or_branch_number is not null
             and   bank_entity_type = p_bank_entity_type
             and   ce_upgrade_id = c_upg_id(i)
             and   group_id is null;
Line: 393

             update ce_upg_bank_rec b
             set    group_id = c_upg_id(i),
                    primary_flag = 'Y',
                    secondary_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number is null
             and   bank_entity_type = p_bank_entity_type
             and   ce_upgrade_id = c_upg_id(i)
             and   not exists
                  (select null from ce_upg_bank_rec b2
                   where  country = b.country
                   and    organization_name = b.organization_name
                   and    bank_entity_type = b.bank_entity_type
                   and    primary_flag = 'Y');
Line: 412

             update ce_upg_bank_rec b
             set    group_id =
                     (select group_id from ce_upg_bank_rec
                      where  country = b.country
                      and    organization_name = b.organization_name
                      and    bank_entity_type = b.bank_entity_type
                      and    source_application_id <> b.source_application_id
                      and    primary_flag = 'Y'
                      and    rownum = 1),
                    primary_flag = 'N',
                    secondary_flag = 'Y',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number is null
             and   bank_entity_type = p_bank_entity_type
             and   ce_upgrade_id = c_upg_id(i)
             and   group_id is null
             and   organization_name = c_org_name(i)
--
             and   not exists
                  (select null from ce_upg_bank_rec b2
                   where  country = b.country
                   and    organization_name = b.organization_name
                   and    bank_entity_type = b.bank_entity_type
                   and    source_application_id = b.source_application_id
                   and    group_id is not null)
--
             and   exists
                  (select null from ce_upg_bank_rec b2
                   where  country = b.country
                   and    organization_name = b.organization_name
                   and    bank_entity_type = b.bank_entity_type
                   and    primary_flag = 'Y');
Line: 447

			(select null from ce_upg_bank_rec b3
			 where  group_id = b2.group_id
		         and    country = b.country
                         and    organization_name = b.organization_name
                         and    bank_entity_type = b.bank_entity_type
                         and    source_application_id = b.source_application_id));
Line: 457

             update ce_upg_bank_rec b
             set    group_id =
                     (select group_id from ce_upg_bank_rec
                      where  country = b.country
                      and    organization_name = b.organization_name
                      and    bank_entity_type = b.bank_entity_type
                      and    primary_flag = 'Y'
                      and    rownum = 1),
                    primary_flag = 'N',
                    secondary_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number is null
             and   organization_name = c_org_name(i)
             and   bank_entity_type = p_bank_entity_type
             and   ce_upgrade_id = c_upg_id(i)
             and   group_id is null;
Line: 497

       c_group_id.delete;
Line: 498

       c_upg_id.delete;
Line: 499

       c_known_as.delete;
Line: 509

           update ce_upg_bank_rec
           set    known_as = nvl(c_known_as(i), known_as),
                  last_update_date = sysdate,
                  last_updated_by = nvl(FND_GLOBAL.user_id,-1)
           where ce_upgrade_id = c_group_id(i);
Line: 523

       c_upg_id.delete;
Line: 524

       c_country.delete;
Line: 525

       c_bank_or_branch_number.delete;
Line: 526

       c_org_name.delete;
Line: 527

       c_jgzz_fiscal_code.delete;
Line: 528

       c_org_name_alt.delete;
Line: 529

       c_status.delete;
Line: 541

         insert into ce_upga_bank_rec
           (party_id,
            ce_upgrade_id,
            parent_upgrade_id,
            bank_entity_type,
            upgrade_status,
            primary_flag,
            secondary_flag,
            group_id,
            bank_or_branch_number,
            bank_code,
            branch_code,
            institution_type,
            country,
            branch_type,
            rfc_code,
            created_by_module,
            organization_name,
            organization_name_phonetic,
            known_as,
            jgzz_fiscal_code,
            mission_statement,
            attribute_category,
            attribute1,
            attribute2,
            attribute3,
            attribute4,
            attribute5,
            attribute6,
            attribute7,
            attribute8,
            attribute9,
            attribute10,
            attribute11,
            attribute12,
            attribute13,
            attribute14,
            attribute15,
            start_date_active,
            end_date_active,
            eft_user_num,
            clearing_house_id,
            creation_date,
            created_by,
            last_update_date,
            last_updated_by,
            last_update_login)
         select
            party_id,
            ce_upgrade_id,
            parent_upgrade_id,
            bank_entity_type,
            upgrade_status,
            primary_flag,
            secondary_flag,
            group_id,
            bank_or_branch_number,
            bank_code,
            branch_code,
            institution_type,
            country,
            branch_type,
            rfc_code,
            curr_module,
            organization_name,
            organization_name_phonetic,
            known_as,
            jgzz_fiscal_code,
            mission_statement,
            attribute_category,
            attribute1,
            attribute2,
            attribute3,
            attribute4,
            attribute5,
            attribute6,
            attribute7,
            attribute8,
            attribute9,
            attribute10,
            attribute11,
            attribute12,
            attribute13,
            attribute14,
            attribute15,
            start_date_active,
            end_date_active,
            eft_user_num,
            clearing_house_id,
            creation_date,
            created_by,
            last_update_date,
            last_updated_by,
            last_update_login
         from ce_upg_bank_rec b
         where ce_upgrade_id = c_upg_id(i)
         and exists
            (select null from ce_upg_bank_rec b2
             where b2.country = b.country
             and b2.bank_or_branch_number <> b.bank_or_branch_number
             and b2.organization_name = b.organization_name
             and b2.bank_entity_type = b.bank_entity_type
             and b2.primary_flag = 'Y'
             and b2.creation_date >= b.creation_date);
Line: 650

         update ce_upg_bank_rec b
         set    organization_name =
                  organization_name || ' ' || bank_or_branch_number,
                last_update_date = sysdate,
                last_updated_by = nvl(FND_GLOBAL.user_id,-1)
         where ce_upgrade_id = c_upg_id(i)
         and exists
            (select null from ce_upg_bank_rec b2
             where b2.country = b.country
             and b2.bank_or_branch_number <> b.bank_or_branch_number
             and b2.organization_name = b.organization_name
             and b2.bank_entity_type = b.bank_entity_type
             and b2.primary_flag = 'Y'
             and b2.creation_date >= b.creation_date);
Line: 694

           delete from ce_bank_upgrade_errors
           where  ce_upgrade_id = c_upg_id(i)
           and    bank_entity_type = 'BANK';
Line: 719

              insert into ce_bank_upgrade_errors
               (ce_upgrade_id, bank_entity_type, key_error_flag, application_id,
                message_name, creation_date, created_by, last_update_date,
                last_updated_by)
              values (c_upg_id(i), 'BANK', 'N', 260, p_msg_name,
                    sysdate, NVL(FND_GLOBAL.user_id,-1),
                    sysdate, NVL(FND_GLOBAL.user_id,-1));
Line: 733

         update ce_upg_bank_rec
         set    upgrade_status = c_status(i),
                last_update_date = sysdate,
                last_updated_by = nvl(FND_GLOBAL.user_id,-1)
         where  ce_upgrade_id = c_upg_id(i)
         and    c_status(i) = 'INVALID';
Line: 748

         update ce_bank_upgrade_modes
         set    bank_upgrade_mode = 'GROUPED',
                last_update_date = sysdate,
                last_updated_by = nvl(FND_GLOBAL.user_id,-1);
Line: 769

         c_country.delete;
Line: 770

         c_bank_or_branch_number.delete;
Line: 771

         c_org_name.delete;
Line: 772

         c_upg_id.delete;
Line: 773

         c_app_id.delete;
Line: 774

         c_creation_date.delete;
Line: 775

         c_group_id.delete;
Line: 789

             update ce_upg_bank_rec bb
             set    group_id = c_upg_id(i),
                    primary_flag = 'Y',
                    secondary_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where  ce_upgrade_id = c_upg_id(i)
             and    bank_or_branch_number is not null
             and not exists
                (select null from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                 where  b.ce_upgrade_id = bb2.parent_upgrade_id
                 and    b.group_id = c_group_id(i)
                 and    b.bank_entity_type = 'BANK'
                 and    bb2.bank_or_branch_number = bb.bank_or_branch_number
                 and    bb2.bank_entity_type = bb.bank_entity_type
                 and    bb2.primary_flag = 'Y'
                 union all
                 select null from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                 where  b.ce_upgrade_id = bb2.parent_upgrade_id
                 and    b.group_id = c_group_id(i)
                 and    b.bank_entity_type = 'BANK'
                 and    bb2.bank_or_branch_number is null
                 and    bb2.organization_name = bb.organization_name
                 and    bb2.bank_entity_type = bb.bank_entity_type
                 and    bb2.primary_flag = 'Y');
Line: 818

             update ce_upg_bank_rec bb
             set    group_id = nvl(
                     (select bb2.group_id
                      from  ce_upg_bank_rec b, ce_upg_bank_rec bb2
                      where b.group_id = c_group_id(i)
                      and   b.country = bb.country
                      and   b.bank_entity_type = 'BANK'
                      and   bb2.parent_upgrade_id = b.ce_upgrade_id
                      and   bb2.bank_or_branch_number = bb.bank_or_branch_number
                      and   bb2.bank_entity_type = bb.bank_entity_type
                      and  bb2.source_application_id <> bb.source_application_id
                      and   bb2.primary_flag = 'Y'
                      and   rownum = 1),
                     (select bb2.group_id
                      from  ce_upg_bank_rec b, ce_upg_bank_rec bb2
                      where b.group_id = c_group_id(i)
                      and   b.country = bb.country
                      and   b.bank_entity_type = 'BANK'
                      and   bb2.parent_upgrade_id = b.ce_upgrade_id
                      and   bb2.bank_or_branch_number is null
                      and   bb2.organization_name = bb.organization_name
                      and   bb2.bank_entity_type = bb.bank_entity_type
                      and  bb2.source_application_id <> bb.source_application_id
                      and   bb2.primary_flag = 'Y'
                      and   rownum = 1)),
                    primary_flag = 'N',
                    secondary_flag = 'Y',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number = c_bank_or_branch_number(i)
             and   bank_or_branch_number is not null
             and   ce_upgrade_id = c_upg_id(i)
             and   bank_entity_type = p_bank_entity_type
             and   group_id is null
             and   not exists
                  (select null
                   from   ce_upg_bank_rec b, ce_upg_bank_rec bb2
                   where  b.country = bb.country
                   and    b.bank_entity_type = 'BANK'
                   and    b.group_id = c_group_id(i)
                   and    b.ce_upgrade_id = bb2.parent_upgrade_id
                   and    bb2.bank_or_branch_number = bb.bank_or_branch_number
                   and    bb2.bank_entity_type = bb.bank_entity_type
                   and    bb2.source_application_id = bb.source_application_id
                   and    bb2.group_id is not null
                   union all
                   select null
                   from   ce_upg_bank_rec b, ce_upg_bank_rec bb2
                   where  b.country = bb.country
                   and    b.bank_entity_type = 'BANK'
                   and    b.group_id = c_group_id(i)
                   and    b.ce_upgrade_id = bb2.parent_upgrade_id
                   and    bb2.bank_or_branch_number is null
                   and    bb2.organization_name = bb.organization_name
                   and    bb2.bank_entity_type = bb.bank_entity_type
                   and    bb2.source_application_id = bb.source_application_id
                   and    bb2.group_id is not null)
             and   exists
                  (select null from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                   where  b.country = bb.country
                   and    b.bank_entity_type = 'BANK'
                   and    b.group_id = c_group_id(i)
                   and    b.ce_upgrade_id = bb2.parent_upgrade_id
                   and    bb2.bank_or_branch_number = bb.bank_or_branch_number
                   and    bb2.bank_entity_type = bb.bank_entity_type
                   and    bb2.primary_flag = 'Y'
                   union all
                   select null
                   from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                   where  b.country = bb.country
                   and    b.bank_entity_type = 'BANK'
                   and    b.group_id = c_group_id(i)
                   and    b.ce_upgrade_id = bb2.parent_upgrade_id
                   and    bb2.bank_or_branch_number is null
                   and    bb2.organization_name = bb.organization_name
                   and    bb2.bank_entity_type = bb.bank_entity_type
                   and    bb2.primary_flag = 'Y');
Line: 899

             update ce_upg_bank_rec bb
             set    group_id = nvl(
                     (select bb2.group_id
                      from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                      where b.country = bb.country
                      and   b.group_id = c_group_id(i)
                      and   b.bank_entity_type = 'BANK'
                      and   b.ce_upgrade_id = bb2.parent_upgrade_id
                      and   bb2.bank_or_branch_number = bb.bank_or_branch_number
                      and   bb2.bank_entity_type = bb.bank_entity_type
                      and   bb2.primary_flag = 'Y'
                      and   rownum = 1),
                     (select bb2.group_id
                      from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                      where b.country = bb.country
                      and   b.group_id = c_group_id(i)
                      and   b.bank_entity_type = 'BANK'
                      and   b.ce_upgrade_id = bb2.parent_upgrade_id
                      and   bb2.bank_or_branch_number is null
                      and   bb2.organization_name = bb.organization_name
                      and   bb2.bank_entity_type = bb.bank_entity_type
                      and   bb2.primary_flag = 'Y'
                      and   rownum = 1)),
                    primary_flag = 'N',
                    secondary_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number = c_bank_or_branch_number(i)
             and   bank_or_branch_number is not null
             and   ce_upgrade_id = c_upg_id(i)
             and   group_id is null;
Line: 935

             update ce_upg_bank_rec bb
             set    group_id = c_upg_id(i),
                    primary_flag = 'Y',
                    secondary_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number is null
             and   ce_upgrade_id = c_upg_id(i)
             and   not exists
                  (select null
                   from   ce_upg_bank_rec b, ce_upg_bank_rec bb2
                   where  b.country = bb.country
                   and    b.group_id = c_group_id(i)
                   and    b.bank_entity_type = 'BANK'
                   and    b.ce_upgrade_id = bb2.parent_upgrade_id
                   and    bb2.organization_name = bb.organization_name
                   and    bb2.bank_entity_type = bb.bank_entity_type
                   and    bb2.primary_flag = 'Y');
Line: 957

             update ce_upg_bank_rec bb
             set    group_id =
                     (select bb2.group_id
                      from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                      where b.country = bb.country
                      and   b.group_id = c_group_id(i)
                      and   b.bank_entity_type = 'BANK'
                      and   b.ce_upgrade_id = bb2.parent_upgrade_id
                      and  bb2.organization_name = bb.organization_name
                      and  bb2.source_application_id <> bb.source_application_id
                      and  bb2.bank_entity_type = bb.bank_entity_type
                      and  bb2.primary_flag = 'Y'
                      and  rownum = 1),
                    primary_flag = 'N',
                    secondary_flag = 'Y',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number is null
             and   ce_upgrade_id = c_upg_id(i)
             and   group_id is null
             and   organization_name = c_org_name(i)
             and   not exists
                  (select null from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                   where  b.country = bb.country
                   and    b.group_id = c_group_id(i)
                   and    b.bank_entity_type = 'BANK'
                   and    b.ce_upgrade_id = bb2.parent_upgrade_id
                   and    bb2.organization_name = bb.organization_name
                   and    bb2.source_application_id = bb.source_application_id
                   and    bb2.bank_entity_type = bb.bank_entity_type
                   and    bb2.group_id is not null)
             and   exists
                  (select null from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                   where  b.country = bb.country
                   and    b.group_id = c_group_id(i)
                   and    b.bank_entity_type = 'BANK'
                   and    b.ce_upgrade_id = bb2.parent_upgrade_id
                   and    bb2.organization_name = bb.organization_name
                   and    bb2.bank_entity_type = bb.bank_entity_type
                   and    bb2.primary_flag = 'Y');
Line: 1001

             update ce_upg_bank_rec bb
             set    group_id =
                     (select bb2.group_id
                      from ce_upg_bank_rec b, ce_upg_bank_rec bb2
                      where  b.country = bb.country
                      and    b.group_id = c_group_id(i)
                      and    b.bank_entity_type = 'BANK'
                      and    b.ce_upgrade_id = bb2.parent_upgrade_id
                      and    bb2.organization_name = bb.organization_name
                      and    bb2.bank_entity_type = bb.bank_entity_type
                      and    bb2.primary_flag = 'Y'
                      and    rownum = 1),
                    primary_flag = 'N',
                    secondary_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where bank_or_branch_number is null
             and   organization_name = c_org_name(i)
             and   ce_upgrade_id = c_upg_id(i)
             and   group_id is null;
Line: 1044

       c_group_id.delete;
Line: 1045

       c_upg_id.delete;
Line: 1046

       c_known_as.delete;
Line: 1056

           update ce_upg_bank_rec
           set    known_as = nvl(c_known_as(i), known_as),
                  last_update_date = sysdate,
                  last_updated_by = nvl(FND_GLOBAL.user_id,-1)
           where ce_upgrade_id = c_group_id(i);
Line: 1063

           insert into ce_upg_cont_point_rec
             (CE_UPGRADE_ID,
              BANK_ENTITY_TYPE,
              UPGRADE_STATUS,
              CONTACT_POINT_TYPE,
              PHONE_LINE_TYPE,
              OWNER_TABLE_NAME,
              OWNER_TABLE_ID,
              CREATED_BY_MODULE,
              PHONE_AREA_CODE,
              PHONE_NUMBER,
              ORG_PRIMARY_PHONE_FLAG,
              CREATION_DATE,
              CREATED_BY,
              LAST_UPDATE_DATE,
              LAST_UPDATED_BY)
           select
              c_group_id(i),
              BANK_ENTITY_TYPE,
              UPGRADE_STATUS,
              CONTACT_POINT_TYPE,
              PHONE_LINE_TYPE,
              OWNER_TABLE_NAME,
              OWNER_TABLE_ID,
              curr_module,
              PHONE_AREA_CODE,
              PHONE_NUMBER,
              ORG_PRIMARY_PHONE_FLAG,
              CREATION_DATE,
              CREATED_BY,
              LAST_UPDATE_DATE,
              LAST_UPDATED_BY
           from  ce_upg_cont_point_rec p
           where ce_upgrade_id = c_upg_id(i)
           and   CONTACT_POINT_TYPE = 'PHONE'
           and   PHONE_LINE_TYPE in ('FAX', 'PAGER')
           and   not exists
                (select null from ce_upg_cont_point_rec p2
                 where p2.ce_upgrade_id = c_group_id(i)
                 and   bank_entity_type = p.BANK_ENTITY_TYPE
                 and   CONTACT_POINT_TYPE = p.CONTACT_POINT_TYPE
                 and   PHONE_LINE_TYPE = p.PHONE_LINE_TYPE);
Line: 1107

           insert into ce_upg_cont_point_rec
             (CE_UPGRADE_ID,
              BANK_ENTITY_TYPE,
              UPGRADE_STATUS,
              CONTACT_POINT_TYPE,
              PHONE_LINE_TYPE,
              OWNER_TABLE_NAME,
              OWNER_TABLE_ID,
              CREATED_BY_MODULE,
              EMAIL_ADDRESS,
              CREATION_DATE,
              CREATED_BY,
              LAST_UPDATE_DATE,
              LAST_UPDATED_BY)
           select
              c_group_id(i),
              BANK_ENTITY_TYPE,
              UPGRADE_STATUS,
              CONTACT_POINT_TYPE,
              PHONE_LINE_TYPE,
              OWNER_TABLE_NAME,
              OWNER_TABLE_ID,
              curr_module,
              EMAIL_ADDRESS,
              CREATION_DATE,
              CREATED_BY,
              LAST_UPDATE_DATE,
              LAST_UPDATED_BY
           from  ce_upg_cont_point_rec p
           where ce_upgrade_id = c_upg_id(i)
           and   CONTACT_POINT_TYPE = 'EMAIL'
           and   not exists
                (select null from ce_upg_cont_point_rec p2
                 where p2.ce_upgrade_id = c_group_id(i)
                 and   bank_entity_type = p.BANK_ENTITY_TYPE
                 and   CONTACT_POINT_TYPE = p.CONTACT_POINT_TYPE);
Line: 1145

           insert into ce_upg_loc_rec l
             (CE_UPGRADE_ID,
              BANK_ENTITY_TYPE,
              UPGRADE_STATUS,
              IDENTIFYING_ADDRESS_FLAG,
              COUNTRY,
              ADDRESS1,
              ADDRESS2,
              ADDRESS3,
              ADDRESS4,
              ADDRESS_STYLE,
              CITY,
              STATE,
              PROVINCE,
              COUNTY,
              POSTAL_CODE,
              ADDRESS_LINE_PHONETIC,
              CREATED_BY_MODULE,
              CREATION_DATE,
              CREATED_BY,
              LAST_UPDATE_DATE,
              LAST_UPDATED_BY)
           select
              c_group_id(i),
              BANK_ENTITY_TYPE,
              UPGRADE_STATUS,
              IDENTIFYING_ADDRESS_FLAG,
              COUNTRY,
              ADDRESS1,
              ADDRESS2,
              ADDRESS3,
              ADDRESS4,
              ADDRESS_STYLE,
              CITY,
              STATE,
              PROVINCE,
              COUNTY,
              POSTAL_CODE,
              ADDRESS_LINE_PHONETIC,
              curr_module,
              CREATION_DATE,
              CREATED_BY,
              LAST_UPDATE_DATE,
              LAST_UPDATED_BY
           from  ce_upg_loc_rec l
           where ce_upgrade_id = c_upg_id(i)
           and   IDENTIFYING_ADDRESS_FLAG = 'N'
           and   not exists
                (select null from ce_upg_loc_rec
                 where ce_upgrade_id = c_group_id(i)
                 and   bank_entity_type = l.BANK_ENTITY_TYPE
                 and   IDENTIFYING_ADDRESS_FLAG = l.IDENTIFYING_ADDRESS_FLAG);
Line: 1206

       c_upg_id.delete;
Line: 1207

       c_country.delete;
Line: 1208

       c_bank_or_branch_number.delete;
Line: 1209

       c_group_id.delete;
Line: 1210

       c_org_name_alt.delete;
Line: 1211

       c_status.delete;
Line: 1222

         insert into ce_upga_bank_rec
           (party_id,
            ce_upgrade_id,
            parent_upgrade_id,
            bank_entity_type,
            upgrade_status,
            primary_flag,
            secondary_flag,
            group_id,
            bank_or_branch_number,
            bank_code,
            branch_code,
            institution_type,
            country,
            branch_type,
            rfc_code,
            created_by_module,
            organization_name,
            organization_name_phonetic,
            known_as,
            jgzz_fiscal_code,
            mission_statement,
            attribute_category,
            attribute1,
            attribute2,
            attribute3,
            attribute4,
            attribute5,
            attribute6,
            attribute7,
            attribute8,
            attribute9,
            attribute10,
            attribute11,
            attribute12,
            attribute13,
            attribute14,
            attribute15,
            start_date_active,
            end_date_active,
            eft_user_num,
            clearing_house_id,
            creation_date,
            created_by,
            last_update_date,
            last_updated_by,
            last_update_login)
         select
            party_id,
            ce_upgrade_id,
            parent_upgrade_id,
            bank_entity_type,
            upgrade_status,
            primary_flag,
            secondary_flag,
            group_id,
            bank_or_branch_number,
            bank_code,
            branch_code,
            institution_type,
            country,
            branch_type,
            rfc_code,
            curr_module,
            organization_name,
            organization_name_phonetic,
            known_as,
            jgzz_fiscal_code,
            mission_statement,
            attribute_category,
            attribute1,
            attribute2,
            attribute3,
            attribute4,
            attribute5,
            attribute6,
            attribute7,
            attribute8,
            attribute9,
            attribute10,
            attribute11,
            attribute12,
            attribute13,
            attribute14,
            attribute15,
            start_date_active,
            end_date_active,
            eft_user_num,
            clearing_house_id,
            creation_date,
            created_by,
            last_update_date,
            last_updated_by,
            last_update_login
         from ce_upg_bank_rec bb
         where ce_upgrade_id = c_upg_id(i)
         and exists
            (select null from ce_upg_bank_rec b, ce_upg_bank_rec bb2
             where b.ce_upgrade_id = bb2.parent_upgrade_id
             and   b.bank_entity_type = 'BANK'
             and   b.group_id = c_group_id(i)
             and bb2.bank_or_branch_number <> bb.bank_or_branch_number
             and bb2.organization_name = bb.organization_name
             and bb2.bank_entity_type = bb.bank_entity_type
             and bb2.primary_flag = 'Y'
             and bb2.creation_date >= bb.creation_date);
Line: 1333

         update ce_upg_bank_rec bb
         set    organization_name =
                  organization_name || ' ' || bank_or_branch_number,
                last_update_date = sysdate,
                last_updated_by = nvl(FND_GLOBAL.user_id,-1)
         where ce_upgrade_id = c_upg_id(i)
         and exists
            (select null from ce_upg_bank_rec b, ce_upg_bank_rec bb2
             where b.ce_upgrade_id = bb2.parent_upgrade_id
             and   b.bank_entity_type = 'BANK'
             and   b.group_id = c_group_id(i)
             and bb2.bank_or_branch_number <> bb.bank_or_branch_number
             and bb2.organization_name = bb.organization_name
             and bb2.bank_entity_type = bb.bank_entity_type
             and bb2.primary_flag = 'Y'
             and bb2.creation_date >= bb.creation_date);
Line: 1377

           delete from ce_bank_upgrade_errors
           where  ce_upgrade_id = c_upg_id(i)
           and    bank_entity_type = 'BRANCH';
Line: 1403

              insert into ce_bank_upgrade_errors
               (ce_upgrade_id, bank_entity_type, key_error_flag, application_id,
                message_name, creation_date, created_by, last_update_date,
                last_updated_by)
              values (c_upg_id(i), 'BRANCH', 'N', 260, p_msg_name,
                    sysdate, NVL(FND_GLOBAL.user_id,-1),
                    sysdate, NVL(FND_GLOBAL.user_id,-1));
Line: 1417

         update ce_upg_bank_rec
         set    upgrade_status = c_status(i),
                last_update_date = sysdate,
                last_updated_by = nvl(FND_GLOBAL.user_id,-1)
         where  ce_upgrade_id = c_upg_id(i)
         and    c_status(i) = 'INVALID';
Line: 1432

         update ce_bank_upgrade_modes
         set    branch_upgrade_mode = 'GROUPED',
                last_update_date = sysdate,
                last_updated_by = nvl(FND_GLOBAL.user_id,-1);
Line: 1452

         c_country.delete;
Line: 1453

         c_acct_name.delete;
Line: 1454

         c_acct_num.delete;
Line: 1455

         c_currency.delete;
Line: 1456

         c_acct_type.delete;
Line: 1457

         c_upg_id.delete;
Line: 1458

         c_app_id.delete;
Line: 1459

         c_creation_date.delete;
Line: 1460

         c_group_id.delete;
Line: 1475

             update ce_upg_bank_accounts ba
             set    group_id = c_upg_id(i),
                    primary_acct_flag = 'Y',
                    secondary_acct_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where  ce_upgrade_id = c_upg_id(i)
             and not exists
                (select null from ce_upg_bank_rec bb, ce_upg_bank_accounts ba2
                 where  bb.ce_upgrade_id = ba2.parent_upgrade_id
                 and    bb.group_id = c_group_id(i)
                 and    bb.bank_entity_type = 'BRANCH'
                 and    ba2.bank_account_name = ba.bank_account_name
                 and    ba2.bank_account_num = ba.bank_account_num
                 and    ba2.currency_code = ba.currency_code
                 and    decode(bb.country, 'JP', ba2.bank_account_type, 'X') =
                        decode(bb.country, 'JP', ba.bank_account_type, 'X')
                 and    ba2.primary_acct_flag = 'Y');
Line: 1497

             update ce_upg_bank_accounts ba
             set    group_id =
                     (select ba2.group_id
                      from  ce_upg_bank_rec bb, ce_upg_bank_accounts ba2
                      where bb.group_id = c_group_id(i)
                      and   bb.bank_entity_type = 'BANK'
                      and   ba2.parent_upgrade_id = bb.ce_upgrade_id
                      and   ba2.bank_account_name = ba.bank_account_name
                      and   ba2.bank_account_num = ba.bank_account_num
                      and   ba2.currency_code = ba.currency_code
                      and   decode(bb.country, 'JP', ba2.bank_account_type, 'X')
                          = decode(bb.country, 'JP', ba.bank_account_type, 'X')
                      and  ba2.source_application_id <> ba.source_application_id
                      and   ba2.primary_acct_flag = 'Y'
                      and   rownum = 1),
                    primary_acct_flag = 'N',
                    secondary_acct_flag = 'Y',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where ce_upgrade_id = c_upg_id(i)
             and   group_id is null
             and   not exists
                  (select null
                   from   ce_upg_bank_rec bb, ce_upg_bank_accounts ba2
                   where  bb.bank_entity_type = 'BRANCH'
                   and    bb.group_id = c_group_id(i)
                   and    bb.ce_upgrade_id = ba2.parent_upgrade_id
                   and    ba2.bank_account_name = ba.bank_account_name
                   and    ba2.bank_account_num = ba.bank_account_num
                   and    ba2.currency_code = ba.currency_code
                   and    decode(bb.country, 'JP', ba2.bank_account_type, 'X') =
                          decode(bb.country, 'JP', ba.bank_account_type, 'X')
                   and    ba2.source_application_id = ba.source_application_id
                   and    ba2.group_id is not null)
             and   exists
                  (select null from ce_upg_bank_rec bb, ce_upg_bank_accounts ba2
                   where  bb.bank_entity_type = 'BRANCH'
                   and    bb.group_id = c_group_id(i)
                   and    bb.ce_upgrade_id = ba2.parent_upgrade_id
                   and    ba2.bank_account_name = ba.bank_account_name
                   and    ba2.bank_account_num = ba.bank_account_num
                   and    ba2.currency_code = ba.currency_code
                   and    decode(bb.country, 'JP', ba2.bank_account_type, 'X') =
                          decode(bb.country, 'JP', ba.bank_account_type, 'X')
                   and    ba2.primary_acct_flag = 'Y');
Line: 1546

             update ce_upg_bank_accounts ba
             set    group_id =
                     (select ba2.group_id
                      from ce_upg_bank_rec bb, ce_upg_bank_accounts ba2
                      where bb.group_id = c_group_id(i)
                      and   bb.bank_entity_type = 'BRANCH'
                      and   bb.ce_upgrade_id = ba2.parent_upgrade_id
                      and   ba2.bank_account_name = ba.bank_account_name
                      and   ba2.bank_account_num = ba.bank_account_num
                      and   ba2.currency_code = ba.currency_code
                      and   decode(bb.country, 'JP', ba2.bank_account_type, 'X')
                          = decode(bb.country, 'JP', ba.bank_account_type, 'X')
                      and   ba2.primary_acct_flag = 'Y'
                      and   rownum = 1),
                    primary_acct_flag = 'N',
                    secondary_acct_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where ce_upgrade_id = c_upg_id(i)
             and   group_id is null;
Line: 1591

       c_group_id.delete;
Line: 1592

       c_app_id.delete;
Line: 1593

       c_upg_id.delete;
Line: 1594

       c_start_date.delete;
Line: 1595

       c_legal_name.delete;
Line: 1596

       c_description.delete;
Line: 1597

       c_xtr_flag.delete;
Line: 1598

       c_pay_flag.delete;
Line: 1599

       c_xtr_amount.delete;
Line: 1600

       c_xtr_percent.delete;
Line: 1601

       c_pay_amount.delete;
Line: 1602

       c_pay_percent.delete;
Line: 1603

       c_cashflow_order.delete;
Line: 1604

       c_target_balance.delete;
Line: 1617

           update ce_upg_bank_accounts
           set    start_date = decode(c_app_id(i), 185, c_start_date(i)),
                  legal_account_name = decode(c_app_id(i), 185, c_legal_name(i)),
                  description = decode(source_application_id, 185, c_description(i)),
                  xtr_use_allowed_flag = decode(c_app_id(i), 185,c_xtr_flag(i)),
                  pay_use_allowed_flag = decode(c_app_id(i), 801,c_pay_flag(i)),
                  xtr_amount_tolerance = decode(c_app_id(i), 185, c_xtr_amount(i)),
                  xtr_percent_tolerance = decode(c_app_id(i), 185, c_xtr_percent(i)),
                  pay_amount_tolerance = decode(c_app_id(i), 801, c_pay_amount(i)),
                  pay_percent_tolerance = decode(c_app_id(i), 801, c_pay_percent(i)),
                  cashflow_display_order = decode(c_app_id(i), 185,c_cashflow_order(i)),
                  target_balance = decode(c_app_id(i), 185, c_target_balance(i)),
                  last_update_date = sysdate,
                  last_updated_by = nvl(FND_GLOBAL.user_id,-1)
           where ce_upgrade_id = c_group_id(i);
Line: 1641

       c_upg_id.delete;
Line: 1642

       c_country.delete;
Line: 1643

       c_bank_number.delete;
Line: 1644

       c_bank_or_branch_number.delete;
Line: 1645

       c_acct_num.delete;
Line: 1646

       c_acct_reference.delete;
Line: 1647

       c_acct_name.delete;
Line: 1648

       c_cd.delete;
Line: 1649

       c_group_id.delete;
Line: 1650

       c_acct_type.delete;
Line: 1651

       c_acct_suffix.delete;
Line: 1652

       c_status.delete;
Line: 1691

           delete from ce_bank_upgrade_errors
           where  ce_upgrade_id = c_upg_id(i)
           and    bank_entity_type = 'ACCOUNT';
Line: 1716

              insert into ce_bank_upgrade_errors
               (ce_upgrade_id, bank_entity_type, key_error_flag, application_id,
                message_name, creation_date, created_by, last_update_date,
                last_updated_by)
              values (c_upg_id(i), 'ACCOUNT', 'N', 260, p_msg_name,
                    sysdate, NVL(FND_GLOBAL.user_id,-1),
                    sysdate, NVL(FND_GLOBAL.user_id,-1));
Line: 1730

         update ce_upg_bank_accounts
         set    upgrade_status = c_status(i),
                last_update_date = sysdate,
                last_updated_by = nvl(FND_GLOBAL.user_id,-1)
         where  ce_upgrade_id = c_upg_id(i)
         and    c_status(i) = 'INVALID';
Line: 1746

         c_upg_id.delete;
Line: 1747

         c_app_id.delete;
Line: 1748

         c_creation_date.delete;
Line: 1749

         c_group_id.delete;
Line: 1750

         c_org_id.delete;
Line: 1751

         c_le_id.delete;
Line: 1752

         c_pay_flag.delete;
Line: 1753

         c_pay_ba_id.delete;
Line: 1767

             update ce_upg_ba_uses_all bau
             set    group_id = c_upg_id(i),
                    primary_acct_use_flag = 'Y',
                    secondary_acct_use_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where  ce_upgrade_id = c_upg_id(i)
             and not exists
                (select null
                 from   ce_upg_bank_accounts ba, ce_upg_ba_uses_all bau2
                 where  ba.ce_upgrade_id = bau2.parent_upgrade_id
                 and    ba.group_id = c_group_id(i)
                 and    nvl(bau2.org_id, -1) = nvl(bau.org_id, -1)
                 and    nvl(bau2.legal_entity_id, -1) = nvl(bau.legal_entity_id, -1)
                 and    bau2.source_application_id = bau.source_application_id
                 and    bau2.primary_acct_use_flag = 'Y');
Line: 1786

             update ce_upg_ba_uses_all bau
             set    group_id =
                     (select bau2.group_id
                      from   ce_upg_bank_accounts ba, ce_upg_ba_uses_all bau2
                      where  ba.ce_upgrade_id = bau2.parent_upgrade_id
                      and    ba.group_id = c_group_id(i)
                      and    bau2.org_id = bau.org_id
                      and    bau2.source_application_id = 200
                      and    bau2.primary_acct_use_flag = 'Y'),
                    primary_acct_use_flag = 'N',
                    secondary_acct_use_flag = 'Y',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where  ce_upgrade_id = c_upg_id(i)
             and    group_id is null
             and    source_application_id = 801
             and not exists
                (select null
                 from   ce_upg_bank_accounts ba, ce_upg_ba_uses_all bau2
                 where  ba.ce_upgrade_id = bau2.parent_upgrade_id
                 and    ba.group_id = c_group_id(i)
                 and    bau2.org_id = bau.org_id
                 and    bau2.source_application_id = bau.source_application_id
                 and    bau2.group_id is not null)
             and exists
                (select null
                 from   ce_upg_bank_accounts ba, ce_upg_ba_uses_all bau2
                 where  ba.ce_upgrade_id = bau2.parent_upgrade_id
                 and    ba.group_id = c_group_id(i)
                 and    bau2.org_id = bau.org_id
                 and    bau2.primary_acct_use_flag = 'Y');
Line: 1821

             update ce_upg_ba_uses_all bau
             set    group_id =
                     (select bau2.group_id
                      from   ce_upg_bank_accounts ba, ce_upg_ba_uses_all bau2
                      where  ba.group_id = c_group_id(i)
                      and    ba.ce_upgrade_id = bau2.parent_upgrade_id
                      and    bau2.org_id = bau.org_id
                      and    bau2.source_application_id =
                             bau.source_application_id
                      and    bau2.primary_flag = 'Y'
                      and    rownum = 1),
                    primary_acct_use_flag = 'N',
                    secondary_acct_use_flag = 'N',
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where ce_upgrade_id = c_upg_id(i)
             and   group_id is null;
Line: 1842

             update ce_upg_ba_uses_all bau
             set    pay_use_enable_flag = c_pay_flag(i),
                    payroll_bank_account_id = c_pay_ba_id(i),
                    last_update_date = sysdate,
                    last_updated_by = nvl(FND_GLOBAL.user_id,-1)
             where  source_application_id = 200
             and    primary_acct_use_flag = 'Y'
             and exists
                (select null
                 from ce_upg_ba_uses_all bau2
                 where  bau2.group_id = bau.ce_upgrade_id
                 and    bau2.ce_upgrade_id = c_upg_id(i)
                 and    bau2.source_application_id = 801
                 and    bau2.secondary_acct_use_flag = 'Y');
Line: 1881

         update ce_bank_upgrade_modes
         set    account_upgrade_mode = 'GROUPED',
                last_update_date = sysdate,
                last_updated_by = nvl(FND_GLOBAL.user_id,-1);