Hi , I am using the below query to join multiple tables using proc sql. Is it possible to perform the same in a data step ?
Could you please help me translate this in data step?
proc sql;
create table work.cte as
select distinct el.flag,
el.balance,
el.daysdelinq,
c.country,
c.postcode,
a.balance,
a.cl,
a.daysdelinq as daysdelinq_2,
a.schufaindicator,
a.finaccno as acct,
c.customerno,
el.row_no
from work.pes_row el,
pxm.accounts a,
pxm.accxref aref,
pxm.contacts c
where el.finaccno = a.finaccno
and a.acc = aref.acc
and aref.customerno = c.customerno
and a.finaccno in (select finaccno from work.acc_list_cards);
quit;
Thank you
Are you obliged to do that with data set ?
Because you are merging 4 tables.
You can do the same in SAS using merge.
But it is very long because you have to sort each table by the id and merge 4 times (i think)
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: