<?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 Assistance with SAS Data Step Merge Issue in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Assistance-with-SAS-Data-Step-Merge-Issue/m-p/942682#M42315</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm having trouble with a data step merge in SAS. Specifically, when I merge two datasets using the &lt;CODE&gt;MERGE&lt;/CODE&gt; statement, I get unexpected results. The merge key seems correct, but the output isn’t as expected.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 11:35:27 GMT</pubDate>
    <dc:creator>alexben</dc:creator>
    <dc:date>2024-09-05T11:35:27Z</dc:date>
    <item>
      <title>Assistance with SAS Data Step Merge Issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Assistance-with-SAS-Data-Step-Merge-Issue/m-p/942682#M42315</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm having trouble with a data step merge in SAS. Specifically, when I merge two datasets using the &lt;CODE&gt;MERGE&lt;/CODE&gt; statement, I get unexpected results. The merge key seems correct, but the output isn’t as expected.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 11:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Assistance-with-SAS-Data-Step-Merge-Issue/m-p/942682#M42315</guid>
      <dc:creator>alexben</dc:creator>
      <dc:date>2024-09-05T11:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with SAS Data Step Merge Issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Assistance-with-SAS-Data-Step-Merge-Issue/m-p/942683#M42316</link>
      <description>&lt;P&gt;Please show us your code and describe how your result is different from your expectations.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 11:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Assistance-with-SAS-Data-Step-Merge-Issue/m-p/942683#M42316</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2024-09-05T11:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with SAS Data Step Merge Issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Assistance-with-SAS-Data-Step-Merge-Issue/m-p/942685#M42317</link>
      <description>&lt;P&gt;In addition to what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;, show us (a portion of) your data so we can see what you are seeing. Please provide the data as working SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;examples and instructions&lt;/A&gt;) and NOT as a file attachment.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 12:23:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Assistance-with-SAS-Data-Step-Merge-Issue/m-p/942685#M42317</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-05T12:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with SAS Data Step Merge Issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Assistance-with-SAS-Data-Step-Merge-Issue/m-p/942700#M42321</link>
      <description>&lt;P&gt;Did you read the log? Some of the common "issues" with Merge create specific messages in the log.&lt;/P&gt;
&lt;P&gt;At least describe the unexpected results, we can't read your mind.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or was this post just an excuse to post an advertising link or whatever that dollartree thing is?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MERGE in SAS, especially in a data step, has a very specific meaning and some people use the term "merge" without much detail of what is expected. Merge is a sort of side-by-side combination, typically using one or more variables to match records, to bring variables from multiple sets together.&lt;/P&gt;
&lt;P&gt;Limitations on the SAS Merge include but are not limited to:&lt;/P&gt;
&lt;P&gt;Only one data set can have multiple observations with the same values of BY variables and get expected results.&lt;/P&gt;
&lt;P&gt;Variables with same names that are not used for matching on a BY statement will have only one variable with a value similar to updating data. There are some complexities involved.&lt;/P&gt;
&lt;P&gt;Minor differences of values such as leading space " John" vs "John", or case "John" "JohN" are not equal and records won't match.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And sometimes people want to APPEND data, stack vertically, but use MERGE because of not being familiar with the difference in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So code of what was attempted and a clear description of what was expected are important to answer this sort of question. Example data is the best way to provide start data,&amp;nbsp; expected and actual results.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 14:22:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Assistance-with-SAS-Data-Step-Merge-Issue/m-p/942700#M42321</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-05T14:22:41Z</dc:date>
    </item>
  </channel>
</rss>

