<?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 Find same observations in two tables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Find-same-observations-in-two-tables/m-p/338062#M63090</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to create a table that has the same building codes between both tables.&lt;/P&gt;
&lt;P&gt;I want all variables from Table A&lt;/P&gt;
&lt;P&gt;From Table B, I only want some variables;&amp;nbsp; Year, NumberUTD&lt;/P&gt;
&lt;P&gt;Both tables may have matching building codes but we don't know.&amp;nbsp; That's what we would like to find out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2017 22:57:46 GMT</pubDate>
    <dc:creator>jcis7</dc:creator>
    <dc:date>2017-03-03T22:57:46Z</dc:date>
    <item>
      <title>Find same observations in two tables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Find-same-observations-in-two-tables/m-p/338062#M63090</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to create a table that has the same building codes between both tables.&lt;/P&gt;
&lt;P&gt;I want all variables from Table A&lt;/P&gt;
&lt;P&gt;From Table B, I only want some variables;&amp;nbsp; Year, NumberUTD&lt;/P&gt;
&lt;P&gt;Both tables may have matching building codes but we don't know.&amp;nbsp; That's what we would like to find out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 22:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Find-same-observations-in-two-tables/m-p/338062#M63090</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2017-03-03T22:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Find same observations in two tables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Find-same-observations-in-two-tables/m-p/338067#M63094</link>
      <description>&lt;P&gt;Something like this, though data would be helpful:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  CREATE TABLE want AS
  SELECT a.*, b.year, b.NumberUTD
  FROM tableA AS a
  INNER JOIN tableB AS b
  ON a.buildingCode = b.buildingCode;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm making assumptions about uniqueness of the data, variable names, etc., but something along those lines will give you what you want.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 23:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Find-same-observations-in-two-tables/m-p/338067#M63094</guid>
      <dc:creator>collinelliot</dc:creator>
      <dc:date>2017-03-03T23:09:45Z</dc:date>
    </item>
  </channel>
</rss>

