<?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: While Joining two tables output of column should be exact match and missing should be previous R in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561500#M157206</link>
    <description>&lt;P&gt;And the output should look like what for that input?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2019 17:58:16 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-05-24T17:58:16Z</dc:date>
    <item>
      <title>While Joining two tables output of column should be exact match and missing should be previous Recor</title>
      <link>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561499#M157205</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;While Left Joining two data sets ,output of a data set should contains only exactly matched and whatever the observations not matched it should pick previous record(Date).Could you please help me on getting this.&lt;/P&gt;&lt;P&gt;Attached excel files&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 17:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561499#M157205</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-05-24T17:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: While Joining two tables output of column should be exact match and missing should be previous R</title>
      <link>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561500#M157206</link>
      <description>&lt;P&gt;And the output should look like what for that input?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 17:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561500#M157206</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-24T17:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: While Joining two tables output of column should be exact match and missing should be previous R</title>
      <link>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561559#M157234</link>
      <description>&lt;P&gt;If you need help with Excel, you should consult a Microsoft-oriented forum.&lt;/P&gt;
&lt;P&gt;If you need help with SAS datasets, please provide such in a usable way (data steps with datelines), so we have a clear picture of what you are working with.&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 12:24:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561559#M157234</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-25T12:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: While Joining two tables output of column should be exact match and missing should be previous R</title>
      <link>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561592#M157251</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select left.transId, workdate, snapDate
from
left left join right on left.transId=right.transId and workDate &amp;gt;= snapDate
group by left.transId, left.workDate
having snapDate = max(snapDate);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 25 May 2019 21:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561592#M157251</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-05-25T21:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: While Joining two tables output of column should be exact match and missing should be previous R</title>
      <link>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561884#M157358</link>
      <description>Sure Sir.Understood Thanks!</description>
      <pubDate>Tue, 28 May 2019 09:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561884#M157358</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-05-28T09:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: While Joining two tables output of column should be exact match and missing should be previous R</title>
      <link>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561889#M157360</link>
      <description>&lt;P&gt;Thanks for your support sir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data= Test_A;by transId workDate;run;&lt;BR /&gt;proc sort data= Test_B;by transId snapDate;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table New as&lt;BR /&gt;select lft.transId, lft.workdate, Rgt.snapDate&lt;BR /&gt;from work.Test_A lft&lt;BR /&gt;left join TEST_B Rgt on lft.transId= Rgt.transId and lft.workDate &amp;gt;= Rgt.snapDate&lt;BR /&gt;group by lft.transId, lft.workDate&lt;BR /&gt;having Rgt.snapDate = max(Rgt.snapDate);&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 09:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561889#M157360</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-05-28T09:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: While Joining two tables output of column should be exact match and missing should be previous R</title>
      <link>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561890#M157361</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 09:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/While-Joining-two-tables-output-of-column-should-be-exact-match/m-p/561890#M157361</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-05-28T09:51:36Z</dc:date>
    </item>
  </channel>
</rss>

