<?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: Need help understanding left join logic (in proc sql) on multiple tables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-understanding-left-join-logic-in-proc-sql-on-multiple/m-p/613186#M179054</link>
    <description>&lt;P&gt;In SAS/SQL these joins are performed left to right, i.e. A with B then the result joined with C. The order can be altered with parentheses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select *&lt;BR /&gt;From A Left Outer Join &lt;BR /&gt;(B Left Outer Join C On B.ID2 = C.ID2) as D&lt;BR /&gt;On A.ID1 = D.ID1;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Dec 2019 03:46:41 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-12-20T03:46:41Z</dc:date>
    <item>
      <title>Need help understanding left join logic (in proc sql) on multiple tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-understanding-left-join-logic-in-proc-sql-on-multiple/m-p/613171#M179049</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking through a SAS program and there are several left joins written that has me scratching my head. To give a simple example, say there are three tables A, B, and C. The coding goes something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select *&lt;/P&gt;&lt;P&gt;From A Left Outer Join B&lt;/P&gt;&lt;P&gt;On A.ID1 = B.ID1&lt;/P&gt;&lt;P&gt;Left Outer Join C&lt;/P&gt;&lt;P&gt;On B.ID2 = C.ID2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the first time I have seen left joins set up this way. I don't know if the program is joining tables B and C and then joining that new table to A, or if it joins A and B first, and then joins C to the new combined A/B table. Any clarification on this is appreciated, thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 23:32:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-understanding-left-join-logic-in-proc-sql-on-multiple/m-p/613171#M179049</guid>
      <dc:creator>Sas_Act_114</dc:creator>
      <dc:date>2019-12-19T23:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help understanding left join logic (in proc sql) on multiple tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-understanding-left-join-logic-in-proc-sql-on-multiple/m-p/613186#M179054</link>
      <description>&lt;P&gt;In SAS/SQL these joins are performed left to right, i.e. A with B then the result joined with C. The order can be altered with parentheses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select *&lt;BR /&gt;From A Left Outer Join &lt;BR /&gt;(B Left Outer Join C On B.ID2 = C.ID2) as D&lt;BR /&gt;On A.ID1 = D.ID1;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 03:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-understanding-left-join-logic-in-proc-sql-on-multiple/m-p/613186#M179054</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-12-20T03:46:41Z</dc:date>
    </item>
  </channel>
</rss>

