<?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 Merging/joining tables in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Merging-joining-tables/m-p/1834#M598</link>
    <description>I have 2 datasets with the same variables and I want to see which observations are in data1 and not in data2.&lt;BR /&gt;
Is there a point and click way of getting the data from data1 which is only in data1 and not in data2.  I can code this but some of our future users will not be coders so will need to know how to do it.&lt;BR /&gt;
Thanks</description>
    <pubDate>Tue, 21 Nov 2006 13:06:32 GMT</pubDate>
    <dc:creator>Ted</dc:creator>
    <dc:date>2006-11-21T13:06:32Z</dc:date>
    <item>
      <title>Merging/joining tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Merging-joining-tables/m-p/1834#M598</link>
      <description>I have 2 datasets with the same variables and I want to see which observations are in data1 and not in data2.&lt;BR /&gt;
Is there a point and click way of getting the data from data1 which is only in data1 and not in data2.  I can code this but some of our future users will not be coders so will need to know how to do it.&lt;BR /&gt;
Thanks</description>
      <pubDate>Tue, 21 Nov 2006 13:06:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Merging-joining-tables/m-p/1834#M598</guid>
      <dc:creator>Ted</dc:creator>
      <dc:date>2006-11-21T13:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Merging/joining tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Merging-joining-tables/m-p/1835#M599</link>
      <description>Ted,&lt;BR /&gt;
&lt;BR /&gt;
You can do this with the query builder in EG.&lt;BR /&gt;
&lt;BR /&gt;
1. Add both tables to the query builder. (Let's call them TABLE1 and TABLE2). Add the desired columns to the "select" list. &lt;BR /&gt;
&lt;BR /&gt;
2. In the Join window, make sure that the tables are joined on the key column you want. (Ex: TABLE1.column and TABLE2.column)&lt;BR /&gt;
&lt;BR /&gt;
3. Modify the Join type to Outer Join (last selection in the list of join types)&lt;BR /&gt;
&lt;BR /&gt;
That specifies that you want all rows from both tables to be considered for the result set.  Now you want to create a filter so that you get only those rows with a value in the first table and NOT in the second table.  So...&lt;BR /&gt;
&lt;BR /&gt;
4. Create a filter: where TABLE2.column IS NULL ("IS NULL" is a selection in the filter operator list)&lt;BR /&gt;
&lt;BR /&gt;
That should get you what you want.&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Tue, 21 Nov 2006 13:33:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Merging-joining-tables/m-p/1835#M599</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2006-11-21T13:33:19Z</dc:date>
    </item>
  </channel>
</rss>

