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 )
SELECT A.*,B.KEY_VALUE FROM DLAB_PROGRAMADATOSVPC.TMP_DBV_CREDITOS_MERCADO A LEFT JOIN E_DW_VIEWS.V_MST_ENCRIP_NRO_DOC_MDL_HISTDIA B ON A.NUM_DOC = CASE WHEN SUBSTR(NRO_DOC,1,2) = '10' AND LENGTH(NRO_DOC) = 11 THEN SUBSTR(NRO_DOC,3,8) WHEN SUBSTR(NRO_DOC,1,2) = '20' AND LENGTH(NRO_DOC) = 11 THEN NRO_DOC ELSE 'X' END
Revise this Paste