<?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: Last day service in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488755#M127432</link>
    <description>&lt;P&gt;Looking at your example data, there is no way to tell which dates (Services - Last Day Service) to pair up and compare; they all have the same Id.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Aug 2018 02:16:27 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2018-08-22T02:16:27Z</dc:date>
    <item>
      <title>Last day service</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488655#M127393</link>
      <description>I am using this code to determine last day service but the out pool put is this&lt;BR /&gt;Id. Day. Last day serviced&lt;BR /&gt;A1. 05/18/2018. 05/26/2028&lt;BR /&gt;B1. 05/17/2018. 05/23/2018&lt;BR /&gt;&lt;BR /&gt;I would need it to look&lt;BR /&gt;B1. 05/18/2018. 04/27/2018&lt;BR /&gt;I dont need to see date if its after date&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select a.id,&lt;BR /&gt;a.date,&lt;BR /&gt;b.date as last_date&lt;BR /&gt;from tablea a&lt;BR /&gt;left join (select id,&lt;BR /&gt;max(date) as date&lt;BR /&gt;from tableb&lt;BR /&gt;group by id) b&lt;BR /&gt;on a.id=b.id;&lt;BR /&gt;quit;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Aug 2018 18:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488655#M127393</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2018-08-21T18:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Last day service</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488680#M127405</link>
      <description>Hardly possible to suggest something without seeing the data you have - at least for me.</description>
      <pubDate>Tue, 21 Aug 2018 19:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488680#M127405</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2018-08-21T19:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Last day service</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488687#M127410</link>
      <description>&lt;P&gt;Guessing what you meant from your fuzzy question, I would suggest:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;on a.id=b.id&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;where b.date &amp;gt; a.date;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and replacing the left join with an inner join.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 19:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488687#M127410</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-08-21T19:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Last day service</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488691#M127413</link>
      <description>I have 2 tables&lt;BR /&gt;Services&lt;BR /&gt;Id. Date&lt;BR /&gt;A1. 05/23/2018&lt;BR /&gt;A1. 05/26/2018&lt;BR /&gt;A1. 05/30/2018&lt;BR /&gt;A1. 05/14/2018&lt;BR /&gt;A1. 05/17/2018&lt;BR /&gt;&lt;BR /&gt;Last day service table&lt;BR /&gt;Id. Date&lt;BR /&gt;A1. 05/10/2018&lt;BR /&gt;A1. 05/29/2018&lt;BR /&gt;A1. 05/31/2018&lt;BR /&gt;Ourput&lt;BR /&gt;&lt;BR /&gt;Id. Date. Last day service&lt;BR /&gt;A1. 05/23/2018.&lt;BR /&gt;A1. 05/26/2018. 05/25/2018&lt;BR /&gt;A1. 05/30/2018. 05/29/2018&lt;BR /&gt;A1. 05/14/2018. 05/10/2018&lt;BR /&gt;A1. 05/17/2018</description>
      <pubDate>Tue, 21 Aug 2018 19:22:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488691#M127413</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2018-08-21T19:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Last day service</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488755#M127432</link>
      <description>&lt;P&gt;Looking at your example data, there is no way to tell which dates (Services - Last Day Service) to pair up and compare; they all have the same Id.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 02:16:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-day-service/m-p/488755#M127432</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-08-22T02:16:27Z</dc:date>
    </item>
  </channel>
</rss>

