Team,I'm having trouble which ever way I go...I've tried correlated updates, I've tried Merge, I don't know anymore.Please help me update tblIndividual.CustomerTkn with tbl_CIS_Partner.New_Partner andTBLINDIVIDUAL.PREMISE_TKN with TBL_CMS_DBSYNC.CN_CSPM01_PREMLOC_TK.Original Select statement:SELECT IND.CUSTOMERTKN, P.NEW_PARTNER, IND.PREMISE_TKN, Sync.CN_CSPM01_PREMLOC_TKFROM TBLINDIVIDUAL INDINNER JOIN TBL_CIS_PARTNER PON IND.CUSTTKN_PRE_SAS = P.OLD_PARTNERAND IND.CUSTOMERTKN <> P.NEW_PARTNERINNER JOIN TBL_CMS_DBSYNC SyncON P.NEW_PARTNER = Sync.CN_CLIENT_ID_NBRWHERE IND.CURRENT_ACTIVE = '1'
Correlated Update:MERGE INTO TBLINDIVIDUAL IND USING(SELECT P.NEW_PARTNER, Sync.CN_CSPM01_PREMLOC_TKFROM TBL_CIS_PARTNER PINNER JOIN TBL_CMS_DBSYNC SYNCON P.NEW_PARTNER = SYNC.CN_CLIENT_ID_NBR --AND IND.CUSTOMERTKN <> P.NEW_PARTNER and IND.CUSTTKN_PRE_SAS = P.OLD_PARTNER) ON ( IND.CURRENT_ACTIVE = '1' --AND IND.CUSTOMERTKN <> P.NEW_PARTNER and IND.CUSTTKN_PRE_SAS = P.OLD_PARTNER)WHEN MATCHED THEN UPDATE SET CUSTOMERTKN =P.NEW_PARTNER, IND.PREMISE_TKN=SYNC.CN_CSPM01_PREMLOC_TK ;
~ Shaun MerrillSeattle area