<?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 Data merge with different field names in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Data-merge-with-different-field-names/m-p/81321#M23436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;data trial;&lt;/P&gt;&lt;P&gt;merge trial1 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trial2;&lt;/P&gt;&lt;P&gt;by&amp;nbsp; ???&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;trial1 has the field gen_id&lt;/P&gt;&lt;P&gt;trial2 has the field sys_id&lt;/P&gt;&lt;P&gt;they are an equal join but with different names.&amp;nbsp; If they had the same name it would be a simple by statement.&amp;nbsp; How can I join these two when they have equal value and different names?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 13:22:37 GMT</pubDate>
    <dc:creator>omega1983</dc:creator>
    <dc:date>2013-05-21T13:22:37Z</dc:date>
    <item>
      <title>Data merge with different field names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-merge-with-different-field-names/m-p/81321#M23436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;data trial;&lt;/P&gt;&lt;P&gt;merge trial1 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trial2;&lt;/P&gt;&lt;P&gt;by&amp;nbsp; ???&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;trial1 has the field gen_id&lt;/P&gt;&lt;P&gt;trial2 has the field sys_id&lt;/P&gt;&lt;P&gt;they are an equal join but with different names.&amp;nbsp; If they had the same name it would be a simple by statement.&amp;nbsp; How can I join these two when they have equal value and different names?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-merge-with-different-field-names/m-p/81321#M23436</guid>
      <dc:creator>omega1983</dc:creator>
      <dc:date>2013-05-21T13:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Data merge with different field names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-merge-with-different-field-names/m-p/81322#M23437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data trial;&lt;/P&gt;&lt;P&gt;merge trial1(rename=(gen_id=sys_id)) trial2;&lt;/P&gt;&lt;P&gt;by sys_id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:27:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-merge-with-different-field-names/m-p/81322#M23437</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2013-05-21T13:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Data merge with different field names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-merge-with-different-field-names/m-p/81323#M23438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Choose the "id" you want to keep and rename the other one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data trial;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; merge trial1 /*keeping gen_id*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trial2 (rename=sys_id=gen_id);&lt;/P&gt;&lt;P&gt;by gen_id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or without renaming/Sorting, use &lt;/P&gt;&lt;P&gt;Proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; create table trail as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select *&amp;nbsp; from trail1 a, trial2 b where&amp;nbsp; a.gen_id=b.sys_id;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:29:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-merge-with-different-field-names/m-p/81323#M23438</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-05-21T13:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Data merge with different field names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-merge-with-different-field-names/m-p/81324#M23439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table trial as&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trial1 t1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inner join trial2 t2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on t1.gen_id=t2.sys_id;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 14:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-merge-with-different-field-names/m-p/81324#M23439</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2013-05-21T14:54:24Z</dc:date>
    </item>
  </channel>
</rss>

