Hi Experts
I have a customer base table which has due date of each customer like below.
cust_id | due_dt |
1 | 4/2/2020 |
2 | 4/9/2020 |
3 | 4/17/2020 |
4 | 4/28/2020 |
18 | 4/30/2020 |
24 | 4/21/2020 |
I also have several tables which are being generated on daily basis. Like Delinquency amount table, outstanding balance table etc.
Table names are:
_yyyymmddDel_amt and _yyyymmdd_Os_Amt
e.g. for April month I have 30*2 tables.
MY desired output is as below:
How Can I achieve this dynamically, without having the need of appending all the daily tables to form a monthly table due to space and run time constraint.
cust_id | due_dt | Del_amt | Os_Amt |
1 | 4/2/2020 | Del_amt from 20200402Del_amt table | Os_amt from 20200402Del_amt table |
2 | 4/9/2020 | Del_amt from 20200409Del_amt table | Os_amt from 20200409Os_amt table |
3 | 4/17/2020 | Del_amt from 20200417Del_amt table | Os_amt from 20200417Os_amt table |
4 | 4/28/2020 | Del_amt from 20200428Del_amt table | Os_amt from 20200428Os_amt table |
18 | 4/30/2020 | Del_amt from 20200430Del_amt table | Os_amt from 20200430Os_amt table |
24 | 4/21/2020 | Del_amt from 20200421Del_amt table | Os_amt from 20200421Os_amt table |
Thanks much for your suggestion, really appreciate
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.