Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)
Paste
Pasted as SQL by registered user vvillacorta ( 1 year ago )
UPDATE A SET A.REGISTRO = B.REGISTRO
--SELECT A.REGISTRO, B.REGISTRO, A.PERIODO, B.PERIODO, A.SEGMENTO_FINAL, B.SEGMENTO_FINAL
FROM ODS.HM_SEG_BPE A
INNER JOIN (
SELECT *
FROM ODS.HM_SEG_BPE_VERSION_OLD
WHERE PERIODO = (SELECT MAX(PERIODO) FROM ODS.HM_SEG_BPE_VERSION_OLD)
) B
ON A.CODUNICOCLI = B.CODUNICOCLI
WHERE A.PERIODO = (SELECT MAX(PERIODO) FROM ODS.HM_SEG_BPE)
Revise this Paste