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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.