Welcome, guest! Login / Register - Why register?
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 ( 3 years ago )
IF OBJECT_ID('TMP_VMVP_BARRIDO_WITH_COD_SBS_V2','U') IS NOT NULL DROP TABLE TMP_VMVP_BARRIDO_WITH_COD_SBS_V2
SELECT
B.COD_MES PERIODO,
B.NUM_DOCUMENTO,
--CASE WHEN ISNULL(B.COD_UNICOCLIENTE, '.') IN ('.', '00000000000')
-- AND ISNULL(PERSONA.CODUNICOCLI, '.') NOT IN ('.', '00000000000') THEN PERSONA.CODUNICOCLI
-- ELSE B.COD_UNICOCLIENTE END COD_UNICO,
--PERSONA.CODSBS,
--PERSONA.TIPDOC,
--PERSONA.NOMBRE_COMPLETO,
--PERSONA.TIPPERSONA,
CASE WHEN DES_RESULTLLAMADA_ININ LIKE '%ACEPTA CAMPANA%' AND
DES_RESULTLLAMADA_ININ NOT LIKE '%NO%' THEN 1 ELSE 0 END FLG_AGENDA,
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(B.PROPENSION, 'á', 'a'), 'é','e'), 'í', 'i'), 'ó', 'o'), 'ú','u'), 'Á', 'A'), 'É', 'E'), 'Í', 'I'), 'Ó', 'O'), 'Ú', 'U') PROPENSION,
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(B.GRUPO_EJE, 'á', 'a'), 'é','e'), 'í', 'i'), 'ó', 'o'), 'ú','u'), 'Á', 'A'), 'É', 'E'), 'Í', 'I'), 'Ó', 'O'), 'Ú', 'U') GRUPO_EJE,
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(B.TIPO_CARGA, 'á', 'a'), 'é','e'), 'í', 'i'), 'ó', 'o'), 'ú','u'), 'Á', 'A'), 'É', 'E'), 'Í', 'I'), 'Ó', 'O'), 'Ú', 'U') TIPO_CARGA,
B.CANT_B,
B.CANT_AC,
B.CANT_G,
B.CANT_CE,
B.CANT_ET,
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(B.CONSENTIMIENTO, 'á', 'a'), 'é','e'), 'í', 'i'), 'ó', 'o'), 'ú','u'), 'Á', 'A'), 'É', 'E'), 'Í', 'I'), 'Ó', 'O'), 'Ú', 'U') CONSENTIMIENTO,
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(B.DES_RESULTLLAMADA_ININ, 'á', 'a'), 'é','e'), 'í', 'i'), 'ó', 'o'), 'ú','u'), 'Á', 'A'), 'É', 'E'), 'Í', 'I'), 'Ó', 'O'), 'Ú', 'U') DES_RESULTLLAMADA_ININ
INTO TMP_VMVP_BARRIDO_WITH_COD_SBS_V2
FROM ODS.HD_NBARRIDO_GESTION_ININ_VTA_BPE B

 

Revise this Paste

Your Name: Code Language: