<?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: Joining tables in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327393#M21803</link>
    <description>&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;I tried an example of coalesce found on the internet. But where do I put this function in my program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.SELECTIE AS&lt;BR /&gt;SELECT t2.a AS a2,&lt;BR /&gt;t1.a1,&lt;BR /&gt;t2.b,&lt;BR /&gt;t2.c,&lt;BR /&gt;t2.d,&lt;BR /&gt;t2.e,&lt;BR /&gt;t2.f,&lt;BR /&gt;t1.g&lt;BR /&gt;FROM WORK.SELECTIE3 t1&lt;BR /&gt;FULL JOIN WORK.SELECTIE2 ON (t1.a = t2.a);&lt;BR /&gt;QUIT;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2017 14:59:16 GMT</pubDate>
    <dc:creator>Miriammess</dc:creator>
    <dc:date>2017-01-25T14:59:16Z</dc:date>
    <item>
      <title>Joining tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327384#M21800</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new in using SAS and I have a problem joining 2 tables together:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 1 table that contains the following variables: a, b, c, d, e, f&lt;/P&gt;&lt;P&gt;I have another table that contains the following variables: a, b, c, d, e, f, g&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to join these tables by a, but when I use a FULL JOIN I got 2 rows with a (a1 and a2) where a2 contains a lot of missing values. When a value is missing in a1 the rest of the variables b, c, d, e, f are also missing, but they were available in my previous table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have the series of number put together without losing information. And I would like to have 1 row of a.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the attachment you can see that number 2441 is only present in a2, but in my previous table b, c, d, e, f where available. So this information is not included when I join the tables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already tried to use a different join, but the results became so weird. I also tried to use append table and than performe a query builder but that gave me also a lot of missing values that were available before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way: I use SAS EG 7.1&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13362i3C9C669FB07505ED/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SAS vraag.PNG" title="SAS vraag.PNG" /&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327384#M21800</guid>
      <dc:creator>Miriammess</dc:creator>
      <dc:date>2017-01-25T14:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Joining tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327389#M21801</link>
      <description>&lt;P&gt;Your join is likely fine, but you need to explicitly deal with the remaining variables that have the same name.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to take the value in either look at the COALESCE/COALESCEC functions.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:26:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327389#M21801</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-25T14:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Joining tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327392#M21802</link>
      <description>&lt;P&gt;Side note: COALESCEC is a data step function.&lt;/P&gt;
&lt;P&gt;COALESCE works on both numerical and character columns/values in SQL.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327392#M21802</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-01-25T14:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Joining tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327393#M21803</link>
      <description>&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;I tried an example of coalesce found on the internet. But where do I put this function in my program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.SELECTIE AS&lt;BR /&gt;SELECT t2.a AS a2,&lt;BR /&gt;t1.a1,&lt;BR /&gt;t2.b,&lt;BR /&gt;t2.c,&lt;BR /&gt;t2.d,&lt;BR /&gt;t2.e,&lt;BR /&gt;t2.f,&lt;BR /&gt;t1.g&lt;BR /&gt;FROM WORK.SELECTIE3 t1&lt;BR /&gt;FULL JOIN WORK.SELECTIE2 ON (t1.a = t2.a);&lt;BR /&gt;QUIT;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327393#M21803</guid>
      <dc:creator>Miriammess</dc:creator>
      <dc:date>2017-01-25T14:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Joining tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327408#M21805</link>
      <description>&lt;P&gt;On every column in your SELECT clause where you have overlapping&amp;nbsp;columns names, and the column values shouldn't conflict.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 15:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327408#M21805</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-01-25T15:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Joining tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327794#M21818</link>
      <description>&lt;P&gt;I use coalescec in proc sql all the time.&amp;nbsp; ?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 18:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/327794#M21818</guid>
      <dc:creator>MeganE</dc:creator>
      <dc:date>2017-01-26T18:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Joining tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/328284#M21839</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Miriammess,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why not try SAS MERGE,&amp;nbsp;to the two tables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data &amp;lt;resulttable&amp;gt;;
&amp;nbsp; &amp;nbsp; &amp;nbsp;merge &amp;lt;table1&amp;gt;&amp;nbsp;&amp;lt;table2&amp;gt;;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;by a;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will result in the exact same thing that you are expecting from FULL JOIN.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Hope it helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2017 14:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Joining-tables/m-p/328284#M21839</guid>
      <dc:creator>ankit___gupta</dc:creator>
      <dc:date>2017-01-29T14:19:45Z</dc:date>
    </item>
  </channel>
</rss>

