<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to fetch total pay off based on due date in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/651730#M22415</link>
    <description>&lt;P&gt;Thanks much for your suggestion, really appreciate&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 May 2020 14:10:20 GMT</pubDate>
    <dc:creator>Trishjais</dc:creator>
    <dc:date>2020-05-29T14:10:20Z</dc:date>
    <item>
      <title>How to fetch total pay off based on due date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/649294#M22254</link>
      <description>&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;I have a customer base table which has due date of each customer like below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;cust_id&lt;/TD&gt;&lt;TD&gt;due_dt&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;4/2/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;4/9/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;4/17/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;4/28/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;TD&gt;4/30/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;TD&gt;4/21/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have several tables which are being generated on daily basis. Like Delinquency amount table, outstanding balance table etc.&lt;/P&gt;&lt;P&gt;Table names are:&lt;/P&gt;&lt;P&gt;_yyyymmddDel_amt and _yyyymmdd_Os_Amt&lt;/P&gt;&lt;P&gt;e.g. for April month I have 30*2 tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MY desired output is as below:&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;cust_id&lt;/TD&gt;&lt;TD&gt;due_dt&lt;/TD&gt;&lt;TD&gt;Del_amt&lt;/TD&gt;&lt;TD&gt;Os_Amt&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;4/2/2020&lt;/TD&gt;&lt;TD&gt;Del_amt from 20200402Del_amt table&lt;/TD&gt;&lt;TD&gt;Os_amt from 20200402Del_amt table&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;4/9/2020&lt;/TD&gt;&lt;TD&gt;Del_amt from 20200409Del_amt table&lt;/TD&gt;&lt;TD&gt;Os_amt from 20200409Os_amt table&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;4/17/2020&lt;/TD&gt;&lt;TD&gt;Del_amt from 20200417Del_amt table&lt;/TD&gt;&lt;TD&gt;Os_amt from 20200417Os_amt table&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;4/28/2020&lt;/TD&gt;&lt;TD&gt;Del_amt from 20200428Del_amt table&lt;/TD&gt;&lt;TD&gt;Os_amt from 20200428Os_amt table&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;TD&gt;4/30/2020&lt;/TD&gt;&lt;TD&gt;Del_amt from 20200430Del_amt table&lt;/TD&gt;&lt;TD&gt;Os_amt from 20200430Os_amt table&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;TD&gt;4/21/2020&lt;/TD&gt;&lt;TD&gt;Del_amt from 20200421Del_amt table&lt;/TD&gt;&lt;TD&gt;Os_amt from 20200421Os_amt table&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 20 May 2020 16:39:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/649294#M22254</guid>
      <dc:creator>Trishjais</dc:creator>
      <dc:date>2020-05-20T16:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch total pay off based on due date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/649311#M22258</link>
      <description>How big do you expect your customer_base table to be?&lt;BR /&gt;Are you looking for speed efficiency to get the output or to program it. &lt;BR /&gt;&lt;BR /&gt;I'd probably write a script that looped through and grabbed each data and appended it into your data set. &lt;BR /&gt;&lt;BR /&gt;%macro insert(ID=, date=);&lt;BR /&gt;%let date_table = %sysfunc(putn(&amp;amp;date, yymmdd10.));&lt;BR /&gt;insert into tableName1&lt;BR /&gt;select del_amt from _&amp;amp;date_table.DEL_amt;&lt;BR /&gt;insert into tableName2&lt;BR /&gt;select os_amt from _&amp;amp;date_table.DEL_amt;&lt;BR /&gt;%mend;&lt;BR /&gt;&lt;BR /&gt;Then call that macro for each line in your data set using CALL EXECUTE(). &lt;BR /&gt;&lt;BR /&gt;There may be more efficient methods but this would definitely work. The code above is just to give you an idea, it's probably not even correct syntax wise.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 May 2020 17:19:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/649311#M22258</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-05-20T17:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch total pay off based on due date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/649314#M22259</link>
      <description>Thanks Reeza,&lt;BR /&gt;Thanks for your input.&lt;BR /&gt;My base table has approx 13 million records, I was looking for an optimized way of achieving this.&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 20 May 2020 17:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/649314#M22259</guid>
      <dc:creator>Trishjais</dc:creator>
      <dc:date>2020-05-20T17:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch total pay off based on due date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/649315#M22260</link>
      <description>Only other optimized way, I can think of, would be to do it for each day block so you're only reading each data set once. Is your date field indexed on your larger data set? &lt;BR /&gt;Actually doing it that way is probably as efficient as you can get since it's a single read of a data set to get the data each time and appends in.</description>
      <pubDate>Wed, 20 May 2020 17:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/649315#M22260</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-05-20T17:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch total pay off based on due date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/651730#M22415</link>
      <description>&lt;P&gt;Thanks much for your suggestion, really appreciate&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 14:10:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-fetch-total-pay-off-based-on-due-date/m-p/651730#M22415</guid>
      <dc:creator>Trishjais</dc:creator>
      <dc:date>2020-05-29T14:10:20Z</dc:date>
    </item>
  </channel>
</rss>

