Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as SQL by registered user vvillacorta ( 1 year ago )
SELECT A.PERIODO PERIODO_CAMPANIA,
A.CAMPANHA,
A.SUBCAMPANHA,
A.CANAL,
A.INICIO,
A.FIN,
A.BANCA,
A.TIPO_CAMPANHA,
T.key_value NUM_DOC,
M.key_value NUM_RUC,
CAST(A.TASA AS FLOAT) TASA,
A.FLG_ACTIVO,
A.GESTION_TIPO,
A.GESTION_SUBTIPO,
A.ID_EMPRESA,
A.ID_CAMPANHA_INSTANCIA
FROM DLAB_PROGRAMADATOSVPC.TMP_VMVP_CAMPHANAS_TOTAL_2 A
LEFT JOIN E_DW_VIEWS.V_MST_ENCRIP_NRO_DOC_MDL_HISTDIA M
ON A.NUM_RUC = M.NRO_DOC
LEFT JOIN E_DW_VIEWS.V_MST_ENCRIP_NRO_DOC_MDL_HISTDIA T
ON A.NUM_DOC = T.NRO_DOC AND A.NUM_DOC <> '.' AND A.NUM_DOC IS NOT NULL AND A.NUM_DOC NOT LIKE ''
WHERE 1 = 1
AND A.NUM_RUC <> '.'
AND A.NUM_RUC IS NOT NULL
AND A.NUM_RUC NOT LIKE ''
--AND A.PERIODO <= (SELECT MAX(PERIODO) FROM DLAB_PROGRAMADATOSVPC.TMP_VMVP_CAMPHANAS_TOTAL_2)
Revise this Paste