<?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 sql do not work in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834904#M82080</link>
    <description>thanks for the response. &lt;BR /&gt;I have the same data format for sas_date variable and EPU is not missing there is a number for each data?</description>
    <pubDate>Fri, 23 Sep 2022 18:09:34 GMT</pubDate>
    <dc:creator>sasphd</dc:creator>
    <dc:date>2022-09-23T18:09:34Z</dc:date>
    <item>
      <title>left join sql do not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834897#M82078</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I run the program below there is no error in the log but the variable EPU is empty "."&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
 create table test1 as
 select Distinct R.*, B.EPU
 from test as R
 left join  EPU_Data as B on R.sas_date=B.sas_date
order by R.Secid, R.sas_date;
 quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Sep 2022 17:52:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834897#M82078</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-09-23T17:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: left join sql do not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834899#M82079</link>
      <description>&lt;P&gt;This happens because one (or both) of the following is true:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Variable EPU is always missing data set B; or&lt;/LI&gt;
&lt;LI&gt;variable SAS_DATE in data set A never matches the values of SAS_DATE in data set B&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Fri, 23 Sep 2022 18:02:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834899#M82079</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-23T18:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: left join sql do not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834904#M82080</link>
      <description>thanks for the response. &lt;BR /&gt;I have the same data format for sas_date variable and EPU is not missing there is a number for each data?</description>
      <pubDate>Fri, 23 Sep 2022 18:09:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834904#M82080</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-09-23T18:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: left join sql do not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834921#M82081</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4327"&gt;@sasphd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have the same data format for sas_date variable and EPU is not missing there is a number for each data?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not the format ... the actual values of SAS_DATE don't match.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 18:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834921#M82081</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-23T18:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: left join sql do not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834990#M82082</link>
      <description>&lt;P&gt;Run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1,
merge
  test (in=t)
  epu_data (
    in=e
    keep=sas_date epu
  )
;
by sas_date,
if t and e;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then post the complete log (code and messages) from this step.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2022 00:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/834990#M82082</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-09-24T00:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: left join sql do not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/835023#M82083</link>
      <description>&lt;P&gt;Maybe you imported the dates from somewhere where they are not represented quite the same as in SAS (e.g. Excel)? Happened to me once. The date numbers were not integers. Try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;left join  EPU_Data as B on round(R.sas_date) = round(B.sas_date)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2022 20:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/left-join-sql-do-not-work/m-p/835023#M82083</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2022-09-24T20:28:47Z</dc:date>
    </item>
  </channel>
</rss>

