<?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: Merge question? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merge-question/m-p/751478#M236563</link>
    <description>&lt;P&gt;What does this statement mean?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Calibri" size="4" color="#000000"&gt;Dataset B has some updated information if the same columns are in both datasets.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Calibri" color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;Does that mean that some of the NON KEY variables in the two datasets are the same?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so &lt;STRONG&gt;and both A and B have unique observations&lt;/STRONG&gt; per by group then a simple MERGE will replace the values read from A with the values read from B.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if A has repeating observations for the same by group then a simple merge will not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide a detailed example of your situation using as few observations and variables as possible.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jul 2021 15:08:09 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-07-01T15:08:09Z</dc:date>
    <item>
      <title>Merge question?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-question/m-p/751451#M236554</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&lt;FONT face="Calibri" color="#000000"&gt;Dataset A which contains 10,000 observations and 700 variables; &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&lt;FONT face="Calibri" color="#000000"&gt;Dataset B, which contains 2,000 observations and 10 variables.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&lt;FONT face="Calibri" color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&lt;FONT face="Calibri" color="#000000"&gt;Both A and B have the same three columns, including ID column.&amp;nbsp;&amp;nbsp; All the 2,000 IDs of dataset B are from dataset A.&amp;nbsp;&amp;nbsp;&amp;nbsp; The IDs in both A and B datasets are non-duplicated.&amp;nbsp;&amp;nbsp; Dataset B has some updated information if the same columns are in both datasets.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&lt;FONT face="Calibri" color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&lt;FONT face="Calibri" color="#000000"&gt;I would like to merge two datasets.&amp;nbsp;&amp;nbsp; The final dataset C should contain 10,000 observations and 707 variables with updated information of dataset B, including the 7 new columns from B too.&amp;nbsp; Please help me to approach this procedure, thank you.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 13:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-question/m-p/751451#M236554</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2021-07-01T13:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Merge question?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-question/m-p/751472#M236559</link>
      <description>&lt;P&gt;Your situation is pretty straight forward.&lt;BR /&gt;Your question would have solution&amp;nbsp; in the books (The little SAS Book, Learning SAS by Example) and various articles.&lt;/P&gt;
&lt;P&gt;This is a must have&amp;nbsp;&lt;A href="https://documentation.sas.com/api/docsets/basess/9.4/content/basess.pdf" target="_blank"&gt;https://documentation.sas.com/api/docsets/basess/9.4/content/basess.pdf&lt;/A&gt;&amp;nbsp;&lt;STRONG&gt; (Chapter 16)&lt;/STRONG&gt;&lt;BR /&gt;One example is&amp;nbsp;&lt;A href="https://www.lexjansen.com/nesug/nesug11/ds/ds03.pdf" target="_blank"&gt;https://www.lexjansen.com/nesug/nesug11/ds/ds03.pdf&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Please revert back when you have issues.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;One important suggestion : start with a small dataset of 20 -30 observations.&lt;BR /&gt;Sample datasets in the books will help.&lt;BR /&gt;Once you are through apply to the complete datasets.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 14:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-question/m-p/751472#M236559</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-07-01T14:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Merge question?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-question/m-p/751478#M236563</link>
      <description>&lt;P&gt;What does this statement mean?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Calibri" size="4" color="#000000"&gt;Dataset B has some updated information if the same columns are in both datasets.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Calibri" color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;Does that mean that some of the NON KEY variables in the two datasets are the same?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so &lt;STRONG&gt;and both A and B have unique observations&lt;/STRONG&gt; per by group then a simple MERGE will replace the values read from A with the values read from B.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if A has repeating observations for the same by group then a simple merge will not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide a detailed example of your situation using as few observations and variables as possible.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 15:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-question/m-p/751478#M236563</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-01T15:08:09Z</dc:date>
    </item>
  </channel>
</rss>

