Please everyone a great god help, in order to compare each column in a table data if there is any update, if there is a flag bit in the update is updated, the target table is probably tens of thousands of data, but SQL don't run out.. To build the index is no use to...
The MERGE INTO TMM_D_OTG_MAJOR_INCIDENT TAR
USING TMM_MV_S_OTG_MAJOR_INCIDENT SRC
ON (TAR) MAJOR_INCIDENT_SID=SRC) MAJOR_INCIDENT_SID)
The WHEN MATCHED THEN
The UPDATE
SET the TAR. END_DATE=SYSDATE
WHERE 1=0
The OR TAR. MAJOR_INCIDENT_NUMBER & lt;> The SRC. MAJOR_INCIDENT_NUMBER
The OR TAR. PRIMARY_APPLICATION_NAME & lt;> The SRC. PRIMARY_APPLICATION_NAME
The OR TAR. PRIMARY_APPLICATION_SID & lt;> The SRC. PRIMARY_APPLICATION_SID
The OR TAR. MAJOR_INCIDENT_STATE_NAME & lt;> The SRC. MAJOR_INCIDENT_STATE_NAME
The OR TAR. OPENED_AT & lt;> The SRC. OPENED_AT
The OR TAR. PRIMARY_IT_SERVICE_NAME & lt;> The SRC. PRIMARY_IT_SERVICE_NAME
The OR TAR. PRIORITY & lt;> The SRC. PRIORITY
The OR TAR. SHORT_DESCRIPTION & lt;> The SRC. SHORT_DESCRIPTION
The OR TAR. U_BUSINESS_IMPACT_DESCRIPTION & lt;> The SRC. U_BUSINESS_IMPACT_DESCRIPTION
The OR TAR. U_BUS_START & lt;> The SRC. U_BUS_START
The OR TAR. U_BUS_END & lt;> The SRC. U_BUS_END
The OR TAR. U_CAUSED_BY_CHANGE & lt;> The SRC. U_CAUSED_BY_CHANGE
The OR TAR. U_COB_INVOKED & lt;> The SRC. U_COB_INVOKED
The OR TAR. U_COB_REASON & lt;> The SRC. U_COB_REASON
The OR TAR. U_COUNTRIES_IMPACTED & lt;> The SRC. U_COUNTRIES_IMPACTED
The OR TAR. U_EXT_END & lt;> The SRC. U_EXT_END
The OR TAR. U_EXT_START & lt;> The SRC. U_EXT_START
The OR TAR. U_FINANCIAL_IMPACT & lt;> The SRC. U_FINANCIAL_IMPACT
The OR TAR. U_FIRM_FINANCIAL_IMPACT & lt;> The SRC. U_FIRM_FINANCIAL_IMPACT
The OR TAR. U_HIGH_TIDE_SEVERITY & lt;> The SRC. U_HIGH_TIDE_SEVERITY
The OR TAR. U_INCIDENT_DURATION_NAME & lt;> The SRC. U_INCIDENT_DURATION_NAME
The OR TAR. U_MISSED_SLA & lt;> The SRC. U_MISSED_SLA
The OR TAR. U_MI_ACC_EXEC_NAME_CC & lt;> The SRC. U_MI_ACC_EXEC_NAME_CC
The OR TAR. U_REGULATORY & lt;> The SRC. U_REGULATORY
The OR TAR. U_REGULATORY_ORG_NAME_CC & lt;> The SRC. U_REGULATORY_ORG_NAME_CC
The OR TAR. U_REPUTATIONAL & lt;> The SRC. U_REPUTATIONAL
The OR TAR. U_SERVICE_OWNER_NAME_CC & lt;> The SRC. U_SERVICE_OWNER_NAME_CC
The OR TAR. U_TOTAL_EXTERNAL_CUST_IMPACTED & lt;> The SRC. U_TOTAL_EXTERNAL_CUST_IMPACTED
The OR TAR. U_TOTAL_IMPACT_DURATION_NAME & lt;> The SRC. U_TOTAL_IMPACT_DURATION_NAME
The OR TAR. U_TOTAL_USER_IMPACTED & lt;> The SRC. U_TOTAL_USER_IMPACTED
The OR TAR. U_FAILED_APPLICATION_INST_NAME & lt;> The SRC. U_FAILED_APPLICATION_INST_NAME
The OR TAR. U_FAILED_APPLICATION_NAME & lt;> The SRC. U_FAILED_APPLICATION_NAME
The OR TAR. U_FAILED_APPLICATION_INST_SID & lt;> The SRC. U_FAILED_APPLICATION_INST_SID
The OR TAR. U_FAILED_APPLICATION_SID & lt;> The SRC. U_FAILED_APPLICATION_SID
The OR TAR. U_TECH_START & lt;> The SRC. U_TECH_START
The OR TAR. U_TECH_END & lt;> The SRC. U_TECH_END
The OR TAR. U_TRADING_RISK & lt;> The SRC. U_TRADING_RISK
The OR TAR. DIRECT_CAUSE_NAME & lt;> The SRC. DIRECT_CAUSE_NAME
The OR TAR. PARENT_INCIDENT_SID & lt;> The SRC. PARENT_INCIDENT_SID
The OR TAR. TASK_CMDB_CI_NAME & lt;> The SRC. TASK_CMDB_CI_NAME
The OR TAR. TASK_OPENED_AT & lt;> The SRC. TASK_OPENED_AT
The OR TAR. TASK_PRIORITY & lt;> The SRC. TASK_PRIORITY
The OR TAR. TASK_SEVERITY & lt;> The SRC. TASK_SEVERITY
The OR TAR. TASK_SHORT_DESCRIPTION & lt;> The SRC. TASK_SHORT_DESCRIPTION
The OR TAR. TASK_NUMBER & lt;> The SRC. TASK_NUMBER
The OR TAR. T_IMPACTED_BUSINESSES_NAME_CC & lt;> The SRC. T_IMPACTED_BUSINESSES_NAME_CC
The OR TAR. T_IMPACTED_COUNTRIES_NAME_CC & lt;> The SRC. T_IMPACTED_COUNTRIES_NAME_CC
The OR TAR. T_IMPACTED_LOBS_NAME_CC & lt;> The SRC. T_IMPACTED_LOBS_NAME_CC
The OR TAR. T_IMPACTED_REGIONS_NAME_CC & lt;> The SRC. T_IMPACTED_REGIONS_NAME_CC
The OR TAR. T_IMPACTED_SECTORS_NAME_CC & lt;> The SRC. T_IMPACTED_SECTORS_NAME_CC
The OR TAR. T_RESOLUTION_DESCRIPTION & lt;> The SRC. T_RESOLUTION_DESCRIPTION
The OR TAR. T_IMPACTED_DSMT_COUNTRIES_NAME & lt;> The SRC. T_IMPACTED_DSMT_COUNTRIES_NAME
The OR TAR. T_IMPACTED_DSMT_SECTORS_NAME & lt;> The SRC. T_IMPACTED_DSMT_SECTORS_NAME
The OR TAR. CAUSED_BY_NUM & lt;> The SRC. CAUSED_BY_NUM
The OR TAR. T_IMPACTED_DSMT_REGIONS_NAME & lt;> The SRC. T_IMPACTED_DSMT_REGIONS_NAME WHEN NOT MATCHED THEN
The INSERT VALUES
(
SEQ_TMM_D_OTG_MAJOR_INCI_PK NEXTVAL,
The SRC MAJOR_INCIDENT_NUMBER,
The SRC PRIMARY_APPLICATION_NAME,
The SRC PRIMARY_APPLICATION_SID,
The SRC MAJOR_INCIDENT_SID,
The SRC MAJOR_INCIDENT_STATE_NAME,
The SRC OPENED_AT,
The SRC PRIMARY_IT_SERVICE_NAME,
The SRC. PRIORITY,
The SRC SHORT_DESCRIPTION,
The SRC U_BUSINESS_IMPACT_DESCRIPTION,
The SRC U_BUS_START,
The SRC U_BUS_END,
The SRC U_CAUSED_BY_CHANGE,
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull