<?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: Left join duplicate issue in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270094#M18732</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68937"&gt;@bohonghong﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that your code contains typos (the commas between "t1" and "clientID" and after "EFF_DATE").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You probably have duplicate values of clientID in TABLE2. These duplicate groups may or may not include different values of EFF_DATE. So, you should first&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;check why there are duplicates&lt;/LI&gt;
&lt;LI&gt;check whether some of them have different values of EFF_DATE&lt;/LI&gt;
&lt;LI&gt;decide how to deal with these duplicates (e.g. select only one observation per clientID from TABLE2 using a selection criterion)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you decide to select only&amp;nbsp;&lt;SPAN&gt;one observation per clientID from TABLE2, you could replace "WORK.table2" by an inline view, i.e. a SELECT statement to perform the selection from TABLE2.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 May 2016 15:56:42 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2016-05-12T15:56:42Z</dc:date>
    <item>
      <title>Left join duplicate issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270092#M18731</link>
      <description>&lt;P&gt;Hi, I have a left join SQL clause below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.QUERY_FOR_APPEND_TABLE_SAS7BDAT AS&lt;BR /&gt;SELECT DISTINCT&amp;nbsp;&lt;/P&gt;&lt;P&gt;t1,clientID&lt;/P&gt;&lt;P&gt;t1.ADJ_CREATION_DATE,&lt;BR /&gt;t1.CREDIT_AMT,&lt;BR /&gt;t2.EFF_DATE,&lt;BR /&gt;FROM work.append_table t1 LEFT JOIN WORK.table2&amp;nbsp;t2 ON (t1.&lt;SPAN&gt;clientID&lt;/SPAN&gt;= t2.&lt;SPAN&gt;clientID&lt;/SPAN&gt;)&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For some strange reason, my observation gone up, and check variable EFF_DATE, filter out the missing value on that variable. still the observation is higher than the work.append_table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there a fix for that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 15:34:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270092#M18731</guid>
      <dc:creator>bohonghong</dc:creator>
      <dc:date>2016-05-12T15:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Left join duplicate issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270094#M18732</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68937"&gt;@bohonghong﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that your code contains typos (the commas between "t1" and "clientID" and after "EFF_DATE").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You probably have duplicate values of clientID in TABLE2. These duplicate groups may or may not include different values of EFF_DATE. So, you should first&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;check why there are duplicates&lt;/LI&gt;
&lt;LI&gt;check whether some of them have different values of EFF_DATE&lt;/LI&gt;
&lt;LI&gt;decide how to deal with these duplicates (e.g. select only one observation per clientID from TABLE2 using a selection criterion)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you decide to select only&amp;nbsp;&lt;SPAN&gt;one observation per clientID from TABLE2, you could replace "WORK.table2" by an inline view, i.e. a SELECT statement to perform the selection from TABLE2.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 15:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270094#M18732</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-05-12T15:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Left join duplicate issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270095#M18733</link>
      <description>&lt;P&gt;Have you checked your APPEND_TABLE for multiple observations for the same CLIENT_ID?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While you are at it, it wouldn't help to check TABLE2 at the same time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The "fix" depends on what you would like to accomplish.&amp;nbsp; Most likely you remove duplicates from APPEND_TABLE first, but you have to decide what the right result would be.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 15:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270095#M18733</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-05-12T15:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Left join duplicate issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270096#M18734</link>
      <description>&lt;P&gt;That's twice in two days that we've posted within a minute of each other, and agreed on the issue.&amp;nbsp; I may have to go back to my old policy of waiting at least an hour before making the first post to a question.&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 16:02:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270096#M18734</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-05-12T16:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Left join duplicate issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270113#M18735</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding﻿&lt;/a&gt;: It would have been even more than twice if I hadn't clicked "Cancel" yesterday when I noticed your reply while I was still writing (and struggling to find the right English words -- as a non-native speaker).&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;
&lt;P&gt;Please don't delay your replies. I&amp;nbsp;am going to change my policy soon (for external reasons) and concentrate on harder tasks and important corrections.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually, in the question at hand, our agreement is only partial:&amp;nbsp;I think, if there weren't any&amp;nbsp;duplicates of clientID in TABLE2, duplicates in APPEND_TABLE could not have the effect described by the OP.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 17:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Left-join-duplicate-issue/m-p/270113#M18735</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-05-12T17:41:40Z</dc:date>
    </item>
  </channel>
</rss>

