<?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: Help with joining 2 datasets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-joining-2-datasets/m-p/887231#M350544</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
call missing(number);
merge
  table1
  table2
;
by origin;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Aug 2023 04:44:00 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-08-01T04:44:00Z</dc:date>
    <item>
      <title>Help with joining 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-joining-2-datasets/m-p/887228#M350543</link>
      <description>&lt;P&gt;I have the following data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to join on "Origin" (Table1) to "Origin" on Table2 and create a new dataset as per Table3 below.&lt;/P&gt;
&lt;P&gt;Table1&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="128" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl63" style="height: 15.0pt; width: 48pt;"&gt;Origin&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;Number&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;23&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;45&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;C&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;D&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;250&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;E&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;600&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;F&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 2&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="191px" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;Origin&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-left: none; width: 48pt;"&gt;Target&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" class="xl65" style="border-left: none; width: 48pt;"&gt;Tfs&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;AB&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;13&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;AC&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;C&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;BA&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;D&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;DA&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;D&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;DL&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;E&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;BA&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;E&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;ZA&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;150&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;E&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;MN&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;E&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;NP&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;150&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;F&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;AB&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="63.75px" height="15px" class="xl65" style="height: 15.0pt; border-top: none;"&gt;F&lt;/TD&gt;
&lt;TD width="63.8281px" height="15px" class="xl65" style="border-top: none; border-left: none;"&gt;ZA&lt;/TD&gt;
&lt;TD width="63.4219px" height="15px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;Desired Output&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 192pt;" border="0" width="256" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;Origin&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Target&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Number&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Tfs&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;AB&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;23&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;13&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;AC&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;C&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;BA&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;D&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;DA&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;250&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;D&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;DL&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;E&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;BA&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;600&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;E&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;ZA&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;150&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;E&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;MN&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;E&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NP&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;150&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;F&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;AB&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;F&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;ZA&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 01 Aug 2023 03:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-joining-2-datasets/m-p/887228#M350543</guid>
      <dc:creator>Haydo</dc:creator>
      <dc:date>2023-08-01T03:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help with joining 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-joining-2-datasets/m-p/887231#M350544</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
call missing(number);
merge
  table1
  table2
;
by origin;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Aug 2023 04:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-joining-2-datasets/m-p/887231#M350544</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-01T04:44:00Z</dc:date>
    </item>
  </channel>
</rss>

