Could some please help on this .Getting below error while executing Merge Statement on Teradata 13.10 .
Error :- Teradata code 5758 The search condition must fully specify the Target table primary index and partition column(s)
PI For Source Table is ENGINE_ID while Target table having PI as SERLZD_ENG_SER_NUM.
MERGE INTO GEADW_PHM_T.SERIALIZED_ENGINE_TGT_REPLICA setr
USING GEADW_PHM_S.SERIALIZED_ENGINE_STG ses
ON ses.ENGINE_ID = setr.SRC_ENG_SRS_NUM AND
ses.CUSTOMER_CODE = setr.SRC_ICAO_CD
WHEN MATCHED THEN
UPDATE SET ENG_SRS_VLDTN_DT=CAST('9999-12-31 23:59:59' AS TIMESTAMP(0))
WHEN NOT MATCHED THEN
INSERT (
SERLZD_ENG_SER_NUM ,
LGCL_DEL_IND ,
SERLZD_ENG_STAT_CD ,
N1_MDFR ,
VLD_ENG_SRS_NUM ,
ENG_CNFG_DT ,
TCC_TMR ,
EGT_SHNT ,
VLD_ENG_OWNR_IATA_CD ,
SRC_ENG_OWNR_IATA_CD ,
ENG_OWNR_VLDTN_DT ,
SRC_ENG_SRS_NUM ,
ENG_SRS_VLDTN_DT ,
ICAO_CD ,
SRC_ICAO_CD ,
ARLN_VLDTN_DT,
FALLOUT_IND )
VALUES (
ses.ENGINE_ID,
'N'
,ses.ENGINE_STATUS
,ses.N1_MODIFIER
,ses.ENGINE_ID
,NULL
,ses.TCC_TIMER --VLD_ENG_SRS_NUM
,NULL--engine_shunt
,NULL --VLD_ENG_OWNR_IATA_CD
,NULL --SRC_ENG_OWNR_IATA_CD
,CURRENT_TIMESTAMP(0)
, ses.ENGINE_ID
,CURRENT_TIMESTAMP(0)
,ses. CUSTOMER_CODE
,ses.CUSTOMER_CODE
,CURRENT_TIMESTAMP(0)
, 'N' );
Thanks in advance
pravek