DBA Data[Home] [Help]

APPS.OE_CUST_MERGE_DATA_FIX SQL Statements

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

Line: 19

    select HEADER_ID
      from oe_order_headers_all
     where ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 31

    select HEADER_ID
      from oe_order_headers_all
     where invoice_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 43

    select HEADER_ID
      from oe_order_headers_all
     where deliver_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 54

    select HEADER_ID
      from oe_order_headers_all
     where sold_to_org_id in
           (select m.duplicate_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 101

    /* site level update */
    IF l_debug_level  > 0 THEN
        oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 111

    UPDATE oe_order_headers_all  a
    set ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 134

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 144

    UPDATE oe_order_headers_all  a
    set invoice_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.invoice_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where invoice_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 167

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 177

    UPDATE oe_order_headers_all  a
    set deliver_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.deliver_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where deliver_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 200

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 206

   /* customer level update */
   IF l_debug_level  > 0 THEN
       oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 216

    UPDATE oe_order_headers_all  a
    set    sold_to_org_id = (select distinct m.customer_id
                                from   ra_customer_merges m
                                where  a.sold_to_org_id = m.duplicate_id
                                and    m.process_flag = 'Y'
                                and    m.request_id = req_id
                                and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id,
           request_id = req_id,
           program_application_id =fnd_global.prog_appl_id,
           program_id = fnd_global.conc_program_id,
           program_update_date = sysdate
    where  sold_to_org_id in (select m.duplicate_id
                                from   ra_customer_merges  m
                               where  m.process_flag = 'Y'
                                 and    m.request_id = req_id
                                 and    m.set_number = set_num);
Line: 241

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 276

    select HEADER_ID
      from oe_order_header_history
     where ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 288

    select HEADER_ID
      from oe_order_header_history
     where invoice_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 300

    select HEADER_ID
      from oe_order_header_history
     where deliver_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 311

    select HEADER_ID
      from oe_order_header_history
     where sold_to_org_id in
           (select m.duplicate_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 353

    UPDATE oe_order_header_history  a
    set ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 379

    UPDATE oe_order_header_history  a
    set invoice_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.invoice_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where invoice_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 405

    UPDATE oe_order_header_history  a
    set deliver_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.deliver_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where deliver_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 437

    UPDATE oe_order_header_history  a
    set    sold_to_org_id = (select distinct m.customer_id
                                from   ra_customer_merges m
                                where  a.sold_to_org_id = m.duplicate_id
                                and    m.process_flag = 'Y'
                                and    m.request_id = req_id
                                and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id,
           request_id = req_id,
           program_application_id =fnd_global.prog_appl_id,
           program_id = fnd_global.conc_program_id,
           program_update_date = sysdate
    where  sold_to_org_id in (select m.duplicate_id
                                from   ra_customer_merges  m
                               where  m.process_flag = 'Y'
                                 and    m.request_id = req_id
                                 and    m.set_number = set_num);
Line: 479

/* -- Interface tables need not be updated

 Procedure OE_Merge_Headers_IFACE (Req_Id          IN NUMBER,
                                   Set_Num         IN NUMBER,
                                   Process_Mode    IN VARCHAR2)
 IS
 CURSOR c1 is
    select HEADER_ID
      from oe_headers_iface_all
     where ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 498

    select HEADER_ID
      from oe_headers_iface_all
     where invoice_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 510

    select HEADER_ID
      from oe_headers_iface_all
     where deliver_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 521

    select HEADER_ID
      from oe_headers_iface_all
     where sold_to_org_id in
           (select m.duplicate_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 563

    UPDATE oe_headers_iface_all  a
    set ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 589

    UPDATE oe_headers_iface_all  a
    set invoice_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.invoice_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where invoice_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 615

    UPDATE oe_headers_iface_all  a
    set deliver_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.deliver_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where deliver_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 646

    UPDATE oe_headers_iface_all  a
    set    sold_to_org_id = (select distinct m.customer_id
                                from   ra_customer_merges m
                                where  a.sold_to_org_id = m.duplicate_id
                                and    m.process_flag = 'Y'
                                and    m.request_id = req_id
                                and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id,
           request_id = req_id,
           program_application_id =fnd_global.prog_appl_id,
           program_id = fnd_global.conc_program_id,
           program_update_date = sysdate
    where  sold_to_org_id in (select m.duplicate_id
                                from   ra_customer_merges  m
                               where  m.process_flag = 'Y'
                                 and    m.request_id = req_id
                                 and    m.set_number = set_num);
Line: 682

Interface tables need not be updated */

/*------------------------------------------------*/
/*--- PRIVATE PROCEDURE OE_Merge_Header_ACKS   ---*/
/*------------------------------------------------*/


 Procedure OE_Merge_Header_ACKS (Req_Id          IN NUMBER,
                                 Set_Num         IN NUMBER,
                                 Process_Mode    IN VARCHAR2)
 IS
 CURSOR c1 is
    select HEADER_ID
      from OE_HEADER_ACKS
     where ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
       and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y'
    for update nowait;
Line: 707

    select HEADER_ID
      from OE_HEADER_ACKS
     where invoice_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
       and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y'
    for update nowait;
Line: 720

    select HEADER_ID
      from OE_HEADER_ACKS
     where deliver_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
       and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y'
    for update nowait;
Line: 732

    select HEADER_ID
      from OE_HEADER_ACKS
     where sold_to_org_id in
           (select m.duplicate_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
       and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y'
    for update nowait;
Line: 779

    /* site level update */
    IF l_debug_level  > 0 THEN
        oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 790

    UPDATE OE_HEADER_ACKS  a
    set ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num)
      and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y';
Line: 814

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 823

    UPDATE OE_HEADER_ACKS  a
    set invoice_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.invoice_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where invoice_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num)
      and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y';
Line: 847

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 856

    UPDATE OE_HEADER_ACKS  a
    set deliver_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.deliver_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where deliver_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num)
      and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y';
Line: 880

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 887

   /* customer level update */
   IF l_debug_level  > 0 THEN
       oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 898

    UPDATE OE_HEADER_ACKS  a
    set    sold_to_org_id = (select distinct m.customer_id
                                from   ra_customer_merges m
                                where  a.sold_to_org_id = m.duplicate_id
                                and    m.process_flag = 'Y'
                                and    m.request_id = req_id
                                and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id,
           request_id = req_id,
           program_application_id =fnd_global.prog_appl_id,
           program_id = fnd_global.conc_program_id,
           program_update_date = sysdate
    where  sold_to_org_id in (select m.duplicate_id
                                from   ra_customer_merges  m
                               where  m.process_flag = 'Y'
                                 and    m.request_id = req_id
                                 and    m.set_number = set_num)
      and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y';
Line: 924

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 956

    select line_id
      from oe_order_lines_all
     where ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 968

    select line_id
      from oe_order_lines_all
     where invoice_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 980

    select line_id
      from oe_order_lines_all
     where deliver_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 992

    select line_id
      from oe_order_lines_all
     where intmed_ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1003

    select line_id
      from oe_order_lines_all
     where sold_to_org_id in
           (select m.duplicate_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1048

    /* site level update */
    IF l_debug_level  > 0 THEN
        oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 1059

    UPDATE oe_order_lines_all  a
    set ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1082

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1090

    UPDATE oe_order_lines_all  a
    set invoice_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.invoice_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where invoice_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1113

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1122

    UPDATE oe_order_lines_all  a
    set deliver_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.deliver_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where deliver_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1145

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1154

    UPDATE oe_order_lines_all  a
    set intmed_ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.intmed_ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where intmed_ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1177

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1183

   /* customer level update */
   IF l_debug_level  > 0 THEN
       oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 1193

    UPDATE oe_order_lines_all  a
    set    sold_to_org_id = (select distinct m.customer_id
                                from   ra_customer_merges m
                                where  a.sold_to_org_id = m.duplicate_id
                                and    m.process_flag = 'Y'
                                and    m.request_id = req_id
                                and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id,
           request_id = req_id,
           program_application_id =fnd_global.prog_appl_id,
           program_id = fnd_global.conc_program_id,
           program_update_date = sysdate
    where  sold_to_org_id in (select m.duplicate_id
                                from   ra_customer_merges  m
                               where  m.process_flag = 'Y'
                                 and    m.request_id = req_id
                                 and    m.set_number = set_num);
Line: 1218

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1250

    select line_id
      from oe_order_lines_history
     where ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1262

    select line_id
      from oe_order_lines_history
     where invoice_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1274

    select line_id
      from oe_order_lines_history
     where deliver_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1286

    select line_id
      from oe_order_lines_history
     where intmed_ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1297

    select line_id
      from oe_order_lines_history
     where sold_to_org_id in
           (select m.duplicate_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1342

    /* site level update */
    IF l_debug_level  > 0 THEN
        oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 1353

    UPDATE oe_order_lines_history  a
    set ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1376

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1385

    UPDATE oe_order_lines_history  a
    set invoice_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.invoice_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where invoice_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1408

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1417

    UPDATE oe_order_lines_history  a
    set deliver_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.deliver_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where deliver_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1440

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1450

    UPDATE oe_order_lines_history  a
    set intmed_ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.intmed_ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where intmed_ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1473

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1480

   /* customer level update */
   IF l_debug_level  > 0 THEN
       oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 1490

    UPDATE oe_order_lines_history  a
    set    sold_to_org_id = (select distinct m.customer_id
                                from   ra_customer_merges m
                                where  a.sold_to_org_id = m.duplicate_id
                                and    m.process_flag = 'Y'
                                and    m.request_id = req_id
                                and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id,
           request_id = req_id,
           program_application_id =fnd_global.prog_appl_id,
           program_id = fnd_global.conc_program_id,
           program_update_date = sysdate
    where  sold_to_org_id in (select m.duplicate_id
                                from   ra_customer_merges  m
                               where  m.process_flag = 'Y'
                                 and    m.request_id = req_id
                                 and    m.set_number = set_num);
Line: 1515

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1542

/*  Interface tables need not be updated

 Procedure OE_Merge_Lines_IFACE (Req_Id          IN NUMBER,
                                 Set_Num         IN NUMBER,
                                 Process_Mode    IN VARCHAR2)
 IS
 CURSOR c1 is
    select line_id
      from oe_lines_iface_all
     where ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1561

    select line_id
      from oe_lines_iface_all
     where invoice_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1573

    select line_id
      from oe_lines_iface_all
     where deliver_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1585

    select line_id
      from oe_lines_iface_all
     where sold_to_org_id in
           (select m.duplicate_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 1622

    UPDATE oe_lines_iface_all  a
    set ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1648

    UPDATE oe_lines_iface_all  a
    set invoice_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.invoice_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where invoice_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1674

    UPDATE oe_lines_iface_all  a
    set deliver_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.deliver_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where deliver_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num);
Line: 1704

    UPDATE oe_lines_iface_all  a
    set    sold_to_org_id = (select distinct m.customer_id
                                from   ra_customer_merges m
                                where  a.sold_to_org_id = m.duplicate_id
                                and    m.process_flag = 'Y'
                                and    m.request_id = req_id
                                and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id,
           request_id = req_id,
           program_application_id =fnd_global.prog_appl_id,
           program_id = fnd_global.conc_program_id,
           program_update_date = sysdate
    where  sold_to_org_id in (select m.duplicate_id
                                from   ra_customer_merges  m
                               where  m.process_flag = 'Y'
                                 and    m.request_id = req_id
                                 and    m.set_number = set_num);
Line: 1740

Interface tables need not be updated  */

/*-------------------------------------------------*/
/*--- PRIVATE PROCEDURE OE_Merge_Line_ACKS      ---*/
/*-------------------------------------------------*/
 Procedure OE_Merge_Line_ACKS (Req_Id          IN NUMBER,
                               Set_Num         IN NUMBER,
                               Process_Mode    IN VARCHAR2)
 IS
 CURSOR c1 is
    select line_id
      from oe_line_acks
     where ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
       and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y'
    for update nowait;
Line: 1763

    select line_id
      from oe_line_acks
     where invoice_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
       and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y'
    for update nowait;
Line: 1776

    select line_id
      from oe_line_acks
     where deliver_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
       and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y'
    for update nowait;
Line: 1789

    select line_id
      from oe_line_acks
     where intmed_ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
       and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y'
    for update nowait;
Line: 1801

    select line_id
      from oe_line_acks
     where sold_to_org_id in
           (select m.duplicate_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
       and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y'
    for update nowait;
Line: 1846

    /* site level update */
    IF l_debug_level  > 0 THEN
        oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 1857

    UPDATE oe_line_acks  a
    set ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num)
      and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y';
Line: 1881

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1889

    UPDATE oe_line_acks  a
    set invoice_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.invoice_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where invoice_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num)
      and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y';
Line: 1913

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1921

    UPDATE oe_line_acks  a
    set deliver_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.deliver_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where deliver_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num)
      and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y';
Line: 1945

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1953

    UPDATE oe_line_acks  a
    set intmed_ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.intmed_ship_to_org_id = m.duplicate_site_id
			              and m.request_id = req_id
                             and m.process_flag = 'Y'
			              and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id,
          request_id = req_id,
          program_application_id =fnd_global.prog_appl_id,
          program_id = fnd_global.conc_program_id,
          program_update_date = sysdate
    where intmed_ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
			                 and m.request_id = req_id
			                 and m.set_number = set_num)
      and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y';
Line: 1977

	    oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 1983

   /* customer level update */
   IF l_debug_level  > 0 THEN
       oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 1993

    UPDATE oe_line_acks  a
    set    sold_to_org_id = (select distinct m.customer_id
                                from   ra_customer_merges m
                                where  a.sold_to_org_id = m.duplicate_id
                                and    m.process_flag = 'Y'
                                and    m.request_id = req_id
                                and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id,
           request_id = req_id,
           program_application_id =fnd_global.prog_appl_id,
           program_id = fnd_global.conc_program_id,
           program_update_date = sysdate
    where  sold_to_org_id in (select m.duplicate_id
                                from   ra_customer_merges  m
                               where  m.process_flag = 'Y'
                                 and    m.request_id = req_id
                                 and    m.set_number = set_num)
      and NVL(ACKNOWLEDGMENT_FLAG,'N') <> 'Y';
Line: 2019

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2105

    select RULE_ELEMENT_ID
    from oe_attachment_rule_elements
    where  attribute_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'SHIP_TO_ORG_ID'
    for update nowait;
Line: 2116

    select RULE_ELEMENT_ID
    from oe_attachment_rule_elements
    where  attribute_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'INVOICE_TO_ORG_ID'
    for update nowait;
Line: 2127

    select RULE_ELEMENT_ID
    from oe_attachment_rule_elements
    where  attribute_value in (select to_char(m.duplicate_id)
                                 from   ra_customer_merges  m
                                 where  m.process_flag = 'Y'
                        and    m.request_id = req_id
                        and    m.set_number = set_num)
    and attribute_code  = 'SOLD_TO_ORG_ID'
    for update nowait;
Line: 2172

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2182

    UPDATE OE_ATTACHMENT_RULE_ELEMENTS  a
    set (attribute_value) = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.attribute_value =
                                                 to_char(m.duplicate_site_id)
                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  attribute_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'SHIP_TO_ORG_ID';
Line: 2205

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2208

  /* site level update */
  IF l_debug_level  > 0 THEN
      oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2218

    UPDATE OE_ATTACHMENT_RULE_ELEMENTS  a
    set (attribute_value) = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.attribute_value =
                                                 to_char(m.duplicate_site_id)
                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  attribute_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'INVOICE_TO_ORG_ID';
Line: 2241

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2245

/* customer level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 2255

    UPDATE OE_ATTACHMENT_RULE_ELEMENTS  a
    set (attribute_value) = (select distinct to_char(m.customer_id)
                                   from   ra_customer_merges m
                                   where  a.attribute_value =
                                                 to_char(m.duplicate_id)
                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  attribute_value in (select to_char(m.duplicate_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'SOLD_TO_ORG_ID';
Line: 2279

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2310

    select CONDITION_ELEMENT_ID
    from oe_def_condn_elems
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'SHIP_TO_ORG_ID'
    for update nowait;
Line: 2321

    select CONDITION_ELEMENT_ID
    from oe_def_condn_elems
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'INVOICE_TO_ORG_ID'
    for update nowait;
Line: 2332

    select CONDITION_ELEMENT_ID
    from oe_def_condn_elems
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'INTMED_SHIP_TO_ORG_ID'
    for update nowait;
Line: 2343

    select CONDITION_ELEMENT_ID
    from oe_def_condn_elems
    where  value_string in (select to_char(m.duplicate_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'SOLD_TO_ORG_ID'
    for update nowait;
Line: 2354

    select ATTR_DEF_RULE_ID
    from oe_def_attr_def_rules
    where  src_constant_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'SHIP_TO_ORG_ID'
    for update nowait;
Line: 2365

    select ATTR_DEF_RULE_ID
    from oe_def_attr_def_rules
    where  src_constant_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'INVOICE_TO_ORG_ID'
    for update nowait;
Line: 2376

    select ATTR_DEF_RULE_ID
    from oe_def_attr_def_rules
    where  src_constant_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'INTMED_SHIP_TO_ORG_ID'
    for update nowait;
Line: 2387

    select ATTR_DEF_RULE_ID
    from oe_def_attr_def_rules
    where  src_constant_value in (select to_char(m.duplicate_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code  = 'SOLD_TO_ORG_ID'
    for update nowait;
Line: 2447

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2457

    UPDATE OE_DEF_CONDN_ELEMS  a
    set value_string = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.value_string =
                                                 to_char(m.duplicate_site_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'SHIP_TO_ORG_ID';
Line: 2481

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2484

  /* site level update */
  IF l_debug_level  > 0 THEN
      oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2493

    UPDATE OE_DEF_CONDN_ELEMS  a
    set value_string = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.value_string =
                                                 to_char(m.duplicate_site_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'INVOICE_TO_ORG_ID';
Line: 2517

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2520

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2529

    UPDATE OE_DEF_CONDN_ELEMS  a
    set value_string = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.value_string =
                                                 to_char(m.duplicate_site_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'INTMED_SHIP_TO_ORG_ID';
Line: 2553

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2556

/* customer level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 2566

    UPDATE OE_DEF_CONDN_ELEMS  a
    set value_string = (select distinct to_char(m.customer_id)
                                   from   ra_customer_merges m
                                   where  a.value_string =
                                                 to_char(m.duplicate_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  value_string in (select to_char(m.duplicate_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'SOLD_TO_ORG_ID';
Line: 2591

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2594

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2605

    UPDATE OE_DEF_ATTR_DEF_RULES  a
    set src_constant_value = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.src_constant_value =
                                                 to_char(m.duplicate_site_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  src_constant_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'SHIP_TO_ORG_ID';
Line: 2629

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2632

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2642

    UPDATE OE_DEF_ATTR_DEF_RULES  a
    set src_constant_value = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.src_constant_value =
                                                 to_char(m.duplicate_site_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  src_constant_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'INVOICE_TO_ORG_ID';
Line: 2666

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2669

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2679

    UPDATE OE_DEF_ATTR_DEF_RULES  a
    set src_constant_value = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.src_constant_value =
                                                 to_char(m.duplicate_site_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  src_constant_value in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'INTMED_SHIP_TO_ORG_ID';
Line: 2703

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2706

/* customer level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 2716

    UPDATE OE_DEF_ATTR_DEF_RULES  a
    set src_constant_value = (select distinct to_char(m.customer_id)
                                   from   ra_customer_merges m
                                   where  a.src_constant_value =
                                                 to_char(m.duplicate_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  src_constant_value in (select to_char(m.duplicate_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and attribute_code = 'SOLD_TO_ORG_ID';
Line: 2741

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2774

    select VALIDATION_TMPLT_ID
    from oe_pc_vtmplt_cols
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and column_name  = 'SHIP_TO_ORG_ID'
    for update nowait;
Line: 2785

    select VALIDATION_TMPLT_ID
    from oe_pc_vtmplt_cols
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and column_name  = 'INVOICE_TO_ORG_ID'
    for update nowait;
Line: 2796

    select VALIDATION_TMPLT_ID
    from oe_pc_vtmplt_cols
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and column_name  = 'INTMED_SHIP_TO_ORG_ID'
    for update nowait;
Line: 2807

    select VALIDATION_TMPLT_ID
    from oe_pc_vtmplt_cols
    where  value_string in (select to_char(m.duplicate_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and column_name  = 'SOLD_TO_ORG_ID'
    for update nowait;
Line: 2856

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2866

    UPDATE OE_PC_VTMPLT_COLS  a
    set value_string = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.value_string =
                                                 to_char(m.duplicate_site_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and column_name = 'SHIP_TO_ORG_ID';
Line: 2890

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2893

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2903

    UPDATE OE_PC_VTMPLT_COLS  a
    set value_string = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.value_string =
                                                 to_char(m.duplicate_site_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and column_name = 'INVOICE_TO_ORG_ID';
Line: 2927

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2930

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 2940

    UPDATE OE_PC_VTMPLT_COLS  a
    set value_string = (select distinct to_char(m.customer_site_id)
                                   from   ra_customer_merges m
                                   where  a.value_string =
                                                 to_char(m.duplicate_site_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  value_string in (select to_char(m.duplicate_site_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and column_name = 'INTMED_SHIP_TO_ORG_ID';
Line: 2964

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 2968

/* customer level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 2978

    UPDATE OE_PC_VTMPLT_COLS  a
    set value_string = (select distinct to_char(m.customer_id)
                                   from   ra_customer_merges m
                                   where  a.value_string =
                                                 to_char(m.duplicate_id)

                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  value_string in (select to_char(m.duplicate_id)
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and column_name = 'SOLD_TO_ORG_ID';
Line: 3003

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 3035

    select hold_source_id
    from oe_hold_sources
    where  hold_entity_id in (select m.duplicate_site_id
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and hold_entity_code = 'S'
    for update nowait;
Line: 3046

    select hold_source_id
    from oe_hold_sources
    where  hold_entity_id in (select m.duplicate_site_id
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and hold_entity_code = 'B'
    for update nowait;
Line: 3058

    select hold_source_id
    from oe_hold_sources
    where  hold_entity_id in (select m.duplicate_id
                                 from   ra_customer_merges  m
                                 where  m.process_flag = 'Y'
                        and    m.request_id = req_id
                        and    m.set_number = set_num)
    and hold_entity_code = 'C'
    for update nowait;
Line: 3103

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 3113

    UPDATE OE_HOLD_SOURCES  a
    set (hold_entity_id) = (select distinct m.customer_site_id
                                   from   ra_customer_merges m
                                   where  a.hold_entity_id =
                                                 m.duplicate_site_id
                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,

           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  hold_entity_id in (select m.duplicate_site_id
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and hold_entity_code = 'S';
Line: 3137

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 3141

/* site level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 3151

    UPDATE OE_HOLD_SOURCES  a
    set (hold_entity_id) = (select distinct m.customer_site_id
                                   from   ra_customer_merges m
                                   where  a.hold_entity_id =

                                                 m.duplicate_site_id
                          and    m.request_id = req_id
                                   and    m.process_flag = 'Y'
                          and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  hold_entity_id in (select m.duplicate_site_id
                                    from   ra_customer_merges  m
                                    where  m.process_flag = 'Y'
                           and    m.request_id = req_id
                           and    m.set_number = set_num)
    and hold_entity_code = 'B';
Line: 3175

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 3180

/* customer level update */
IF l_debug_level  > 0 THEN
    oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 3190

    UPDATE OE_HOLD_SOURCES  a
    set    hold_entity_id = (select distinct m.customer_id
                                from   ra_customer_merges m
                                where  a.hold_entity_id =
                              m.duplicate_id
                                and    m.process_flag = 'Y'
                       and    m.request_id = req_id
                       and    m.set_number = set_num),
           last_update_date = sysdate,
           last_updated_by = fnd_global.user_id,
           last_update_login = fnd_global.login_id
    where  hold_entity_id in (select m.duplicate_id
                                 from   ra_customer_merges  m
                                 where  m.process_flag = 'Y'
                        and    m.request_id = req_id
                        and    m.set_number = set_num)
    and hold_entity_code = 'C';
Line: 3213

      oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 3242

    select DROP_SHIP_SOURCE_ID
      from oe_drop_ship_sources
     where LINE_LOCATION_ID in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 3277

    /* site level update */
    IF l_debug_level  > 0 THEN
        oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 3287

    UPDATE OE_DROP_SHIP_SOURCES  a
    set line_location_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.line_location_id = m.duplicate_site_id
                             and m.request_id = req_id
                             and m.process_flag = 'Y'
                             and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id
    where line_location_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
                                and m.request_id = req_id
                                and m.set_number = set_num);
Line: 3306

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 3334

    select CUST_ITEM_SETTING_ID
      from oe_cust_item_settings
     where site_use_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 3345

    select CUST_ITEM_SETTING_ID
      from oe_cust_item_settings
     where customer_id in
           (select m.duplicate_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 3386

    /* site level update */
    IF l_debug_level  > 0 THEN
        oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 3396

    UPDATE OE_CUST_ITEM_SETTINGS  a
    set site_use_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.site_use_id = m.duplicate_site_id
                             and m.request_id = req_id
                             and m.process_flag = 'Y'
                             and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id
    where site_use_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
                                and m.request_id = req_id
                                and m.set_number = set_num);
Line: 3415

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 3418

    /* customer level update */
    IF l_debug_level  > 0 THEN
        oe_debug_pub.add(  'CUSTOMER LEVEL UPDATE' ) ;
Line: 3428

    UPDATE OE_CUST_ITEM_SETTINGS  a
    set customer_id = (select distinct m.customer_id
                            from ra_customer_merges m
                           where a.customer_id = m.duplicate_id
                             and m.request_id = req_id
                             and m.process_flag = 'Y'
                             and m.set_number = set_num),
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id
    where customer_id in (select m.duplicate_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
                                and m.request_id = req_id
                                and m.set_number = set_num);
Line: 3447

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;
Line: 3478

    select Set_Id
      from oe_sets
     where ship_to_org_id in
           (select m.duplicate_site_id
              from ra_customer_merges m
             where m.process_flag = 'Y'
               and m.request_id = req_id
               and m.set_number = set_num)
    for update nowait;
Line: 3513

    /* site level update */
    IF l_debug_level  > 0 THEN
        oe_debug_pub.add(  'SITE LEVEL UPDATE' ) ;
Line: 3523

    UPDATE oe_sets  a
    set ship_to_org_id = (select distinct m.customer_site_id
                            from ra_customer_merges m
                           where a.ship_to_org_id = m.duplicate_site_id
                             and m.request_id = req_id
                             and m.process_flag = 'Y'
                             and m.set_number = set_num),
          update_date = sysdate,
          updated_by = fnd_global.user_id,
          update_login = fnd_global.login_id
    where ship_to_org_id in (select m.duplicate_site_id
                               from ra_customer_merges  m
                              where m.process_flag = 'Y'
                                and m.request_id = req_id
                                and m.set_number = set_num);
Line: 3543

        oe_debug_pub.add(  G_COUNT || ' ROWS UPDATED' ) ;