DBA Data[Home] [Help]

APPS.CSD_MIGRATE_FROM_115X_PKG SQL Statements

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

Line: 20

  select cr.repair_line_id,
         cr.rowid
  from   csd_repairs cr
  where  cr.repair_mode IS NULL
   and   cr.repair_line_id >= p_start
   and   cr.repair_line_id <= p_end;
Line: 53

               UPDATE csd_repairs
               SET   repair_mode = 'WIP',
	                auto_process_rma    = 'N',
				 last_update_date    = sysdate,
				 last_updated_by     = fnd_global.user_id,
				 last_update_login   = fnd_global.login_id
               WHERE  rowid = rowid_mig(j);
Line: 67

                 INSERT INTO CSD_UPG_ERRORS
		          (ORIG_SYSTEM_REFERENCE,
          	      TARGET_SYSTEM_REFERENCE,
		           ORIG_SYSTEM_REFERENCE_ID,
		           UPGRADE_DATETIME,
		           ERROR_MESSAGE,
		           MIGRATION_PHASE)
                 VALUES( 'CSD_REPAIRS'
          	     ,'CSD_REPAIRS'
	     	     ,repair_line_id_mig(j)
		          ,sysdate
	               ,v_error_text
	      	     ,'11.5.8'  );
Line: 159

  select ced.estimate_detail_id,
         ced.source_id,
         ced.order_header_id,
         ced.order_line_id,
         ced.quantity_required,
         ced.creation_date,
         cra.repair_type_id,
	    ced.rowid
    from cs_estimate_details ced,
         csd_repairs cra
   where ced.source_id = cra.repair_line_id
     and ced.inventory_item_id = cra.inventory_item_id
     and ced.source_code = 'DR'
     and not exists ( select '*' from csd_product_transactions cpt
                      where cpt.estimate_detail_id = ced.estimate_detail_id)
     and not exists ( select '*' from csd_repair_estimate_lines crel
                      where crel.estimate_detail_id = ced.estimate_detail_id)
     and ced.estimate_detail_id >= p_start
	and ced.estimate_detail_id <= p_end;
Line: 187

    Select Released_Status
    From Wsh_Delivery_Details
    Where source_header_id = p_order_Header_id
    and   source_line_id   = p_order_line_id ;
Line: 254

              Select 'x'
               into  l_dummy
               from  oe_order_headers_all
              where  header_id = order_header_id_mig(j)
               and   booked_flag = 'Y';
Line: 329

         INSERT INTO CSD_PRODUCT_TRANSACTIONS(
           PRODUCT_TRANSACTION_ID,
           REPAIR_LINE_ID,
           ESTIMATE_DETAIL_ID,
           ACTION_TYPE,
           ACTION_CODE,
           LOT_NUMBER,
           SUB_INVENTORY,
           INTERFACE_TO_OM_FLAG,
           BOOK_SALES_ORDER_FLAG,
           RELEASE_SALES_ORDER_FLAG,
           SHIP_SALES_ORDER_FLAG,
           PROD_TXN_STATUS,
           PROD_TXN_CODE,
           LAST_UPDATE_DATE,
           CREATION_DATE,
           LAST_UPDATED_BY,
           CREATED_BY,
           LAST_UPDATE_LOGIN,
           ATTRIBUTE1,
           ATTRIBUTE2,
           ATTRIBUTE3,
           ATTRIBUTE4,
           ATTRIBUTE5,
           ATTRIBUTE6,
           ATTRIBUTE7,
           ATTRIBUTE8,
           ATTRIBUTE9,
           ATTRIBUTE10,
           ATTRIBUTE11,
           ATTRIBUTE12,
           ATTRIBUTE13,
           ATTRIBUTE14,
           ATTRIBUTE15,
           CONTEXT,
           OBJECT_VERSION_NUMBER
          ) VALUES (
           CSD_PRODUCT_TRANSACTIONS_S1.nextval
           ,l_repair_line_id
           ,l_estimate_detail_id
           ,l_action_type
           ,l_action_code
           ,NULL
           ,NULL
           ,l_interface_to_om_flag
           ,l_book_sales_order_flag
           ,l_release_sales_order_flag
           ,l_ship_sales_order_flag
           ,l_prod_txn_status
           ,l_prod_txn_code
           ,sysdate
           ,l_creation_date
	      ,FND_GLOBAL.USER_ID
           ,FND_GLOBAL.USER_ID
           ,FND_GLOBAL.LOGIN_ID
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,NULL
           ,1 );
Line: 411

                 INSERT INTO CSD_UPG_ERRORS
		          (ORIG_SYSTEM_REFERENCE,
          	      TARGET_SYSTEM_REFERENCE,
		           ORIG_SYSTEM_REFERENCE_ID,
		           UPGRADE_DATETIME,
		           ERROR_MESSAGE,
		           MIGRATION_PHASE)
                 VALUES(
		       	'CS_ESTIMATE_DETAILS'
          	     ,'CSD_PRODUCT_TRANSACTIONS'
	     	     ,estimate_detail_id_mig(j)
		          ,sysdate
	               ,v_error_text
	      	     ,'11.5.8'  );
Line: 434

                 INSERT INTO CSD_UPG_ERRORS
		          (ORIG_SYSTEM_REFERENCE,
          	      TARGET_SYSTEM_REFERENCE,
		           ORIG_SYSTEM_REFERENCE_ID,
		           UPGRADE_DATETIME,
		           ERROR_MESSAGE,
		           MIGRATION_PHASE)
                 VALUES(
		       	'CS_ESTIMATE_DETAILS'
          	     ,'CSD_PRODUCT_TRANSACTIONS'
	     	     ,estimate_detail_id_mig(j)
		          ,sysdate
	               ,v_error_text
	      	     ,'11.5.8'  );
Line: 506

  select distinct
         ced.source_id,
         cia.summary,
         cra.creation_date,
	    NVL(cra.promise_date, cra.creation_date),
	    cra.approval_status
    from cs_estimate_details ced,
         cs_incidents_all_b cia,
         csd_repairs cra
   where ced.source_id   = cra.repair_line_id
     and ced.incident_id = cia.incident_id
     and ced.inventory_item_id <> cra.inventory_item_id
     and ced.source_code = 'DR'
     and ced.estimate_detail_id >= p_min_id                 -- slab limits
     and ced.estimate_detail_id <= p_max_id                 -- slab limits
     and not exists ( select '*' from csd_repair_estimate cre
                      where cre.repair_line_id = ced.source_id)
     and not exists ( select '*' from csd_product_transactions cpt
                      where cpt.estimate_detail_id = ced.estimate_detail_id);
Line: 548

      select 'x'
       into l_dummy
       from  fnd_lookups
      where lookup_type = 'CSD_UNIT_OF_MEASURE'
        and lookup_code = l_lead_time_uom;
Line: 600

     INSERT INTO CSD_REPAIR_ESTIMATE
	  (   REPAIR_ESTIMATE_ID
          ,REPAIR_LINE_ID
          ,ESTIMATE_STATUS
          ,ESTIMATE_DATE
          ,WORK_SUMMARY
          ,LEAD_TIME
          ,LEAD_TIME_UOM
          ,CREATION_DATE
          ,CREATED_BY
          ,LAST_UPDATED_BY
          ,LAST_UPDATE_DATE
          ,LAST_UPDATE_LOGIN
          ,OBJECT_VERSION_NUMBER
          ,ESTIMATE_FREEZE_FLAG)
	VALUES (
           CSD_REPAIR_ESTIMATE_S1.nextval
          ,l_repair_line_id
          ,l_estimate_status
          ,l_estimate_date
          ,l_work_summary
          ,l_lead_time
          ,l_lead_time_uom
          ,l_estimate_date
          ,FND_GLOBAL.USER_ID
          ,FND_GLOBAL.USER_ID
          ,sysdate
          ,FND_GLOBAL.LOGIN_ID
          ,1
          ,l_estimate_freeze_flag);
Line: 635

          INSERT INTO csd_upg_errors
                      (orig_system_reference,
                      target_system_reference,
                      orig_system_reference_id,
                      upgrade_datetime,
                      error_message,
                      migration_phase)
              VALUES ('CS_ESTIMATE_DETAILS',
                      'CSD_REPAIR_ESTIMATE',
                      l_repair_line_id,
                      sysdate,
                      v_error_text,
                      '11.5.8');
Line: 651

            raise_application_error( -20000, 'Error while migrating CSD_ESTIMATE_DETAILS table data: Error while inserting into CSD_REPAIR_ESTIMATE. '|| v_error_text);
Line: 703

  select ced.estimate_detail_id,
         ced.source_id,
         ced.order_header_id,
         ced.order_line_id,
         ced.creation_date,
         cre.repair_estimate_id
    from cs_estimate_details ced,
         csd_repairs cra,
         csd_repair_estimate cre
   where ced.source_id = cra.repair_line_id
     and cra.repair_line_id = cre.repair_line_id
     and ced.inventory_item_id <> cra.inventory_item_id
     and ced.source_code = 'DR'
     and ced.estimate_detail_id >= p_min_id                 -- slab limits
     and ced.estimate_detail_id <= p_max_id                 -- slab limits
     and not exists ( select '*' from csd_repair_estimate_lines crel
                      where crel.estimate_detail_id = ced.estimate_detail_id)
      and not exists ( select '*' from csd_product_transactions cpt
                      where cpt.estimate_detail_id = ced.estimate_detail_id);
Line: 776

        INSERT INTO CSD_REPAIR_ESTIMATE_LINES(
           REPAIR_ESTIMATE_LINE_ID
          ,REPAIR_ESTIMATE_ID
          ,CREATION_DATE
          ,CREATED_BY
          ,LAST_UPDATED_BY
          ,LAST_UPDATE_DATE
          ,LAST_UPDATE_LOGIN
          ,OBJECT_VERSION_NUMBER
          ,ESTIMATE_DETAIL_ID
          ,ITEM_COST)
	   VALUES (
           CSD_REPAIR_ESTIMATE_LINES_S1.nextval
          ,l_repair_estimate_id
          ,l_creation_date
          ,FND_GLOBAL.USER_ID
          ,FND_GLOBAL.USER_ID
          ,sysdate
          ,FND_GLOBAL.LOGIN_ID
          ,1
          ,l_estimate_detail_id
          ,l_item_cost);
Line: 802

          INSERT INTO csd_upg_errors
                      (orig_system_reference,
                      target_system_reference,
                      orig_system_reference_id,
                      upgrade_datetime,
                      error_message,
                      migration_phase)
              VALUES ('CS_ESTIMATE_DETAILS',
                      'CSD_REPAIR_ESTIMATE_LINES',
                      l_estimate_detail_id,
                      sysdate,
                      v_error_text,
                      '11.5.8');
Line: 817

            raise_application_error( -20000, 'Error while migrating CS_ESTIMATE_DETAILS table data: Error while inserting into CSD_REPAIR_ESTIMATE_LINES. '|| v_error_text);
Line: 848

  select  crjx.repair_job_xref_id,
          cr.inventory_item_id,
          crjx.rowid
  from    csd_repair_job_xref crjx,
          csd_repairs cr
  where   crjx.repair_line_id = cr.repair_line_id
  and     crjx.repair_job_xref_id >= p_min
  and     crjx.repair_job_xref_id <= p_max
  and     crjx.inventory_item_id is null;
Line: 894

        UPDATE csd_repair_job_xref
        SET    inventory_item_id = inventory_item_id_mig(j),
               last_update_date  = sysdate,
			last_update_login = fnd_global.login_id,
			last_updated_by   = fnd_global.user_id
        WHERE  rowid = rowid_mig(j);
Line: 907

        INSERT INTO csd_upg_errors
          (orig_system_reference,
           target_system_reference,
           orig_system_reference_id,
           upgrade_datetime,
           error_message,
           migration_phase)
        VALUES
          ('CSD_REPAIR_JOB_XREF',
           'CSD_REPAIR_JOB_XREF',
           repair_job_xref_id_mig(j),
           sysdate,
           l_error_text,
           '11.5.8');
Line: 969

  select crtb.repair_type_id,
         crtb.rowid
  from   csd_repair_types_b crtb
  where  crtb.seeded_flag IS NULL;
Line: 995

        UPDATE csd_repair_types_b
        SET  repair_mode              = l_repair_mode,
             repair_type_ref          = l_repair_type_ref,
             auto_process_rma         = l_auto_process_rma,
             interface_to_om_flag     = l_interface_to_om_flag,
             book_sales_order_flag    = l_book_sales_order_flag,
             release_sales_order_flag = l_release_sales_order_flag,
             seeded_flag              = l_seeded_flag,
		   last_update_date         = sysdate,
		   last_update_login        = fnd_global.login_id,
		   last_updated_by          = fnd_global.user_id
        WHERE  rowid = rowid_mig(j);
Line: 1013

        INSERT INTO csd_upg_errors
          (orig_system_reference,
           target_system_reference,
           orig_system_reference_id,
           upgrade_datetime,
           error_message,
           migration_phase)
        VALUES
          ('CSD_REPAIR_TYPES_B',
           'CSD_REPAIR_TYPES_B',
           repair_type_id_mig(j),
           sysdate,
           l_error_text,
           '11.5.8');