<?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 How to Join data into another table in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-Join-data-into-another-table/m-p/780588#M31649</link>
    <description>&lt;P&gt;I have two tables and I want to join them together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The columns of table one are&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;name,&lt;/LI&gt;&lt;LI&gt;age,&lt;/LI&gt;&lt;LI&gt;birthday.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The columns of table two are&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;name,&lt;/LI&gt;&lt;LI&gt;salary.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i merge the data from table 2 into table 1 where the names are the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sql;
CREATE TABLE all_data AS
  SELECT a.*, b.* FROM
  table1 a full join table2 b
  on a.name == b.name
;
quit;&lt;/PRE&gt;&lt;P&gt;However, I get this error.&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
a missing value, BTRIM, INPUT, PUT, SUBSTRING, USER.&lt;/PRE&gt;How do I do this?&lt;/DIV&gt;</description>
    <pubDate>Tue, 16 Nov 2021 21:28:43 GMT</pubDate>
    <dc:creator>heyyou1</dc:creator>
    <dc:date>2021-11-16T21:28:43Z</dc:date>
    <item>
      <title>How to Join data into another table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Join-data-into-another-table/m-p/780588#M31649</link>
      <description>&lt;P&gt;I have two tables and I want to join them together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The columns of table one are&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;name,&lt;/LI&gt;&lt;LI&gt;age,&lt;/LI&gt;&lt;LI&gt;birthday.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The columns of table two are&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;name,&lt;/LI&gt;&lt;LI&gt;salary.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i merge the data from table 2 into table 1 where the names are the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sql;
CREATE TABLE all_data AS
  SELECT a.*, b.* FROM
  table1 a full join table2 b
  on a.name == b.name
;
quit;&lt;/PRE&gt;&lt;P&gt;However, I get this error.&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
a missing value, BTRIM, INPUT, PUT, SUBSTRING, USER.&lt;/PRE&gt;How do I do this?&lt;/DIV&gt;</description>
      <pubDate>Tue, 16 Nov 2021 21:28:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Join-data-into-another-table/m-p/780588#M31649</guid>
      <dc:creator>heyyou1</dc:creator>
      <dc:date>2021-11-16T21:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join data into another table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Join-data-into-another-table/m-p/780591#M31650</link>
      <description>Show the full log - where SAS indicates the error is informative.&lt;BR /&gt;No double == sign is one difference. I make the reverse mistake constantly in R &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 16 Nov 2021 21:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Join-data-into-another-table/m-p/780591#M31650</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-16T21:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join data into another table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Join-data-into-another-table/m-p/780599#M31651</link>
      <description>Note that SAS also supports the Natural Join which is useful.</description>
      <pubDate>Tue, 16 Nov 2021 21:54:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Join-data-into-another-table/m-p/780599#M31651</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-16T21:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join data into another table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Join-data-into-another-table/m-p/780626#M31658</link>
      <description>&lt;P&gt;SAS will SHOW YOU where the mistake is.&lt;/P&gt;
&lt;PRE&gt;70    proc sql;
71    CREATE TABLE all_data AS
72      SELECT a.*, b.* FROM
73      table1 a full join table2 b
74      on a.name == b.name
                   -
                   22
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
              a missing value, BTRIM, INPUT, PUT, SUBSTRING, USER.

75    ;
76    quit;
&lt;/PRE&gt;
&lt;P&gt;You have typed the equality operator symbol twice. Remove one of the equal signs,&amp;nbsp; &lt;FONT face="courier new,courier"&gt;a.name=b.name&lt;/FONT&gt;, or just use the &lt;SPAN&gt;&amp;nbsp;mnemonic equivalent, &lt;FONT face="courier new,courier"&gt;a.name eq b.name&lt;/FONT&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrcon/p00iah2thp63bmn1lt20esag14lh.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrcon/p00iah2thp63bmn1lt20esag14lh.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 23:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Join-data-into-another-table/m-p/780626#M31658</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-11-16T23:56:12Z</dc:date>
    </item>
  </channel>
</rss>

