Hello, I was told that Data steps performs better than Proc SQL, so I need help at "translating" my code to data steps. My proc sql is taking too long to finish, I think its because its too big the file, sometimes the Enterprise Guide crashs when i run the code. My Proc Sql is: proc sql noprint;
create table OPER_SAC as
SELECT DISTINCT
GLCR_CARTEIRA_SAC.CUSTOMER_CNPJ_PARENT_L format=BEST14.,
CONTRATO_CESS.CodigoCedente length=8 format=BEST14. AS CodigoCedente,
CONTRATO_CESS.CPFCNPJCliente length=8 format=BEST14. AS CPFCNPJCliente,
GLCR_CARTEIRA_SAC.NAME_L length=56 format=$56. AS NAME_L_SAC
FROM LSRCRDPJ.GLCR_CARTEIRA GLCR_CARTEIRA_SAC
INNER JOIN LSRCRDPJ.CONTRATO_CESS CONTRATO_CESS
ON (substr(put(GLCR_CARTEIRA_SAC.CUSTOMER_CNPJ_PARENT_L,14.),7,8) = (substr(put(CONTRATO_CESS.CPFCNPJCliente,14.),1,8)
OR substr(put(GLCR_CARTEIRA_SAC.CUSTOMER_CNPJ_PARENT_L,14.),1,8) = substr(put(CONTRATO_CESS.CPFCNPJCliente,14.),1,8))
ORDER BY GLCR_CARTEIRA_SAC.CUSTOMER_CNPJ_PARENT_L,
CONTRATO_CESS.CPFCNPJCliente,
CONTRATO_CESS.CodigoCedente,
GLCR_CARTEIRA_SAC.NAME_L
;
QUIT; The key 'CUSTOMER_CNPJ_PARENT_L' and "CPFCNPJCliente' are not unique, don't ask me why, thats the data I have to work with. So please, if you could help me translating to data steps I'll appreciate it. Thank you
... View more