<?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: Why left join doesn't bring everything from left in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336001#M76145</link>
    <description>&lt;P&gt;Is there anything else in your SQL that could cause this drop of records (i.e. a DISTINCT in the SELECT clause)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post your SQL code and the related log.&lt;/P&gt;</description>
    <pubDate>Sun, 26 Feb 2017 18:33:26 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2017-02-26T18:33:26Z</dc:date>
    <item>
      <title>Why left join doesn't bring everything from left</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/335997#M76141</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I have 2 tables table a and table b&lt;BR /&gt;I want everything coming from table a An only where we match table b.&lt;BR /&gt;&lt;BR /&gt;From table. A left join table b on a.tid =b.tid and a.date = b.date&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Table a has 7500 records table b has 100k records when I run it i get 7200 records ... I don't know why it's dropping 300 records ....thanks</description>
      <pubDate>Sun, 26 Feb 2017 17:53:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/335997#M76141</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2017-02-26T17:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why left join doesn't bring everything from left</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/335998#M76142</link>
      <description>&lt;P&gt;You most have a WHERE or a GROUP BY or some other way that is subsetting the results.&lt;/P&gt;
&lt;P&gt;Without seeing the full query and the SAS log it is hard to diagnosis further.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 18:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/335998#M76142</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-02-26T18:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why left join doesn't bring everything from left</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336001#M76145</link>
      <description>&lt;P&gt;Is there anything else in your SQL that could cause this drop of records (i.e. a DISTINCT in the SELECT clause)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post your SQL code and the related log.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 18:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336001#M76145</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-02-26T18:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why left join doesn't bring everything from left</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336014#M76149</link>
      <description>From table a left join table b on b.date = a.date And b.id =a.id&lt;BR /&gt;And b.tracking is not null&lt;BR /&gt;), run;&lt;BR /&gt;&lt;BR /&gt;Table a has 74289 records table b has 200k records&lt;BR /&gt;My output is 74315 ... where do I put where statement after on replaces 1st and. ?</description>
      <pubDate>Sun, 26 Feb 2017 20:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336014#M76149</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2017-02-26T20:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why left join doesn't bring everything from left</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336023#M76150</link>
      <description>&lt;P&gt;You are getting MORE records than exist in the source table A, not LESS.&lt;/P&gt;
&lt;P&gt;This happens when there are mulitple records in B for some of the key variables. So in this case there are some values of ID and DATE that have more than one record in table B and also appear in table A.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:10:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336023#M76150</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-02-26T21:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why left join doesn't bring everything from left</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336024#M76151</link>
      <description>&lt;P&gt;First you were saying that you weren't getting enough records .. now you're showing too many.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like others have said, post your code and some example data, and an example data file of what you expect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336024#M76151</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-26T21:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why left join doesn't bring everything from left</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336025#M76152</link>
      <description>Hi Tom your right I just noticed dup with same date and I'd from table a. That's ok what a relief .... follow up in where statement and grouping where do I add where after 1st and ?</description>
      <pubDate>Sun, 26 Feb 2017 21:13:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336025#M76152</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2017-02-26T21:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why left join doesn't bring everything from left</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336026#M76153</link>
      <description>I figured it out art thanks for response I had dups</description>
      <pubDate>Sun, 26 Feb 2017 21:14:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-left-join-doesn-t-bring-everything-from-left/m-p/336026#M76153</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2017-02-26T21:14:43Z</dc:date>
    </item>
  </channel>
</rss>

