<?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 merge problem in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/merge-problem/m-p/184431#M46897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone help me out by letting me know why after the merge only the first instance of hindex has a value. As it's a one to many merge shouldn't both rows have a value for hindex? Thanks for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data check;&lt;/P&gt;&lt;P&gt;length name $15;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input name hindex n;&lt;/P&gt;&lt;P&gt;Cards;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; griffith . 93&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; griffith . 93&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data name;&lt;/P&gt;&lt;P&gt;length name $15;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input name hindex n;&lt;/P&gt;&lt;P&gt;Cards;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; griffith 2 93&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data check2;&lt;/P&gt;&lt;P&gt;merge check name ;&lt;/P&gt;&lt;P&gt;by n;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Feb 2014 17:58:19 GMT</pubDate>
    <dc:creator>cypher85</dc:creator>
    <dc:date>2014-02-24T17:58:19Z</dc:date>
    <item>
      <title>merge problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/merge-problem/m-p/184431#M46897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone help me out by letting me know why after the merge only the first instance of hindex has a value. As it's a one to many merge shouldn't both rows have a value for hindex? Thanks for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data check;&lt;/P&gt;&lt;P&gt;length name $15;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input name hindex n;&lt;/P&gt;&lt;P&gt;Cards;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; griffith . 93&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; griffith . 93&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data name;&lt;/P&gt;&lt;P&gt;length name $15;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input name hindex n;&lt;/P&gt;&lt;P&gt;Cards;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; griffith 2 93&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data check2;&lt;/P&gt;&lt;P&gt;merge check name ;&lt;/P&gt;&lt;P&gt;by n;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 17:58:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/merge-problem/m-p/184431#M46897</guid>
      <dc:creator>cypher85</dc:creator>
      <dc:date>2014-02-24T17:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: merge problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/merge-problem/m-p/184432#M46898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HINDEX should not be part of CHECK.&amp;nbsp; The missing values from CHECK are overwriting the valid values from NAME.&amp;nbsp; You could correct this at the last minute if need be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data check2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; merge check (drop=hindex) name;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by name;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 18:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/merge-problem/m-p/184432#M46898</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-02-24T18:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: merge problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/merge-problem/m-p/184433#M46899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand that in this instance "hindex" does not need to be on "check". This is simplified version of the merge problem I am having. But, this example still illustrates the issue. Even though "hindex" is in "check" all of the values are blank. When I merge with "name" shouldn't all values of "hindex" for the merge variable "n" be replaced by the values in "name". Only the first occurrence is being replaced.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 17:02:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/merge-problem/m-p/184433#M46899</guid>
      <dc:creator>cypher85</dc:creator>
      <dc:date>2014-02-26T17:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: merge problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/merge-problem/m-p/184434#M46900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The values you are getting are to be expected.&amp;nbsp; The process is actually more complex than you are envisioning.&amp;nbsp; When MERGE reads data for a NAME, it reads each observation once.&amp;nbsp; It does not read an observation from NAME multiple times.&amp;nbsp; The process is more like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the current value of NAME, see if the data set CHECK contains another observation.&amp;nbsp; If so, read it in.&amp;nbsp; Then see if the data set NAME contains another observation.&amp;nbsp; If so, read it in.&amp;nbsp; So the value of NAME overwrites the value in CHECK for the first observation.&amp;nbsp; But that value never gets read again.&amp;nbsp; It merely gets replaced by the value from CHECK on the remaining observations.&amp;nbsp; A good reference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/library/nesug99/ad155.pdf"&gt;http://www.ats.ucla.edu/stat/sas/library/nesug99/ad155.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 17:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/merge-problem/m-p/184434#M46900</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-02-26T17:13:19Z</dc:date>
    </item>
  </channel>
</rss>

