<?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: Proc sql Joins in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566695#M159306</link>
    <description>&lt;P&gt;Please find attchd sample data&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2019 19:21:45 GMT</pubDate>
    <dc:creator>Ranjeeta</dc:creator>
    <dc:date>2019-06-17T19:21:45Z</dc:date>
    <item>
      <title>Proc sql Joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566661#M159284</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 tables&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reg_SHSC_sorted with 207 cases&lt;/P&gt;&lt;P&gt;CIHI_SHSC_sorted with 115 cases&lt;/P&gt;&lt;P&gt;I am trying to find the cases that are&amp;nbsp; present in the 1st table i.e.&amp;nbsp;Reg_SHSC_sorted and missing from&amp;nbsp; the 2nd table i.e. CIHI_SHSC_sorted&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the following code correct?&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table MissingCIHI as&lt;/P&gt;&lt;P&gt;select a.RegID, a.days_to_removal_date,a.site,b.*&lt;/P&gt;&lt;P&gt;from reg_SHSC_sorted a&lt;/P&gt;&lt;P&gt;left join CIHI_SHSC_sorted b&lt;/P&gt;&lt;P&gt;on a.Reg_ID =b.ID&lt;/P&gt;&lt;P&gt;and a.site=b.site&lt;/P&gt;&lt;P&gt;and a.days_to_removal_date&amp;gt;=b.days_to_admdate-2&lt;/P&gt;&lt;P&gt;and a.days_to_removal_date &amp;lt;=b.days_to_ddate+2&lt;/P&gt;&lt;P&gt;where a.RegID NE b.ID&lt;/P&gt;&lt;P&gt;;quit;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 18:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566661#M159284</guid>
      <dc:creator>Ranjeeta</dc:creator>
      <dc:date>2019-06-17T18:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql Joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566665#M159286</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240770"&gt;@Ranjeeta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 tables&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reg_SHSC_sorted with 207 cases&lt;/P&gt;
&lt;P&gt;CIHI_SHSC_sorted with 115 cases&lt;/P&gt;
&lt;P&gt;I am trying to find the cases that are&amp;nbsp; present in the 1st table i.e.&amp;nbsp;Reg_SHSC_sorted and missing from&amp;nbsp; the 2nd table i.e. CIHI_SHSC_sorted&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;"Cases" meaning some ID value matches in both data sets, or "cases" meaning the entire record matches in both data sets? What do the dates in the code have to do with this problem, this is not explained anywhere.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 18:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566665#M159286</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-06-17T18:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql Joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566667#M159288</link>
      <description>&lt;P&gt;I am interested in the Cases that have the same ID value and the days to removal date and the other dates mentioned are some of the join conditions that I want to be satisfied for cases that have the same ID value in both datasets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 18:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566667#M159288</guid>
      <dc:creator>Ranjeeta</dc:creator>
      <dc:date>2019-06-17T18:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql Joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566673#M159292</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240770"&gt;@Ranjeeta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am interested in the Cases that have the same ID value and the days to removal date and the other dates mentioned are some of the join conditions that I want to be satisfied for cases that have the same ID value in both datasets&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is still hard to decipher. Please show us some sample input data, and the desired output.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 18:26:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566673#M159292</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-06-17T18:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql Joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566695#M159306</link>
      <description>&lt;P&gt;Please find attchd sample data&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 19:21:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566695#M159306</guid>
      <dc:creator>Ranjeeta</dc:creator>
      <dc:date>2019-06-17T19:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql Joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566697#M159307</link>
      <description>&lt;P&gt;Many of us will not download and open MS Office documents as they are a security risk.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to see your data, preferably as a SAS data step, following these instructions&amp;nbsp;&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;&amp;nbsp;and we also need to see the desired output as well.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 19:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-Joins/m-p/566697#M159307</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-06-17T19:25:52Z</dc:date>
    </item>
  </channel>
</rss>

