proc sql;
title 'TabelaTIAB';
title2 'tabela T402TIAB';
create table tabelaTIAB as
select
tiab.nr_ctr,
datepart(tiab.dt_ven) format=date9. as dt_ven,
tiab.cd_cli,
tiab.nr_adl,
tiab.sg_mod
from STGCREDM.STG_T402TIAB as tiab
INNER JOIN (SELECT cd_cli, nr_ctr, nr_adl, sg_mod from work.tabelac) AS C ON
tiab.cd_cli = c.cd_cli and tiab.nr_ctr = C.nr_ctr and tiab.nr_adl = C.nr_adl and tiab.sg_mod = C.sg_mod
order by cd_cli,nr_ctr,nr_adl,sg_mod;
quit; worked for me just putting the two-level-name in the columns in the SELECT statement. Thanks!
... View more