<?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 or set for combining data? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Merge-or-set-for-combining-data/m-p/702981#M25969</link>
    <description>&lt;P&gt;Use MERGE when all data sets have the same key variables, same names and same type.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;In case a variable X is numeric in one data set but char type in another you will have an issue,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;either using merge or set.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use MERGE all data sets should be first sorted by KEYs and finally you can merge them by KEYs.&lt;/P&gt;
&lt;P&gt;Merging mean keeping the order of observations by KEYs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By SET you concatenate the data sets (appending them) in the original order.&lt;/P&gt;
&lt;P&gt;Finally you can &lt;STRONG&gt;sort&lt;/STRONG&gt; it by KEYs to get same result as by using MERGE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Dec 2020 06:59:51 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2020-12-02T06:59:51Z</dc:date>
    <item>
      <title>Merge or set for combining data?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merge-or-set-for-combining-data/m-p/702955#M25962</link>
      <description>&lt;P&gt;I am close to finishing a semester project working with loads of data sets together. Some needing to be combined vertically or horizontally, transposed, etc.&lt;/P&gt;&lt;P&gt;Anyway, I'm still at a point of not fully understanding the differences in a merge or set statement. I've combined data sets both ways but also have a tendency to cause issues I later have to deal with. Is it&amp;nbsp;&lt;EM&gt;better&amp;nbsp;&lt;/EM&gt;to use a merge or set statement or what issues may I run into?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 03:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merge-or-set-for-combining-data/m-p/702955#M25962</guid>
      <dc:creator>crawfjor</dc:creator>
      <dc:date>2020-12-02T03:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Merge or set for combining data?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merge-or-set-for-combining-data/m-p/702980#M25968</link>
      <description>&lt;P&gt;Put simply:&lt;/P&gt;
&lt;P&gt;Merge: combine data values into same record&lt;/P&gt;
&lt;P&gt;Set: combine data into different records&lt;/P&gt;
&lt;DIV id="tinyMceEditorLinusH_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="tinyMceEditorLinusH_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 06:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merge-or-set-for-combining-data/m-p/702980#M25968</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2020-12-02T06:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Merge or set for combining data?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merge-or-set-for-combining-data/m-p/702981#M25969</link>
      <description>&lt;P&gt;Use MERGE when all data sets have the same key variables, same names and same type.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;In case a variable X is numeric in one data set but char type in another you will have an issue,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;either using merge or set.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use MERGE all data sets should be first sorted by KEYs and finally you can merge them by KEYs.&lt;/P&gt;
&lt;P&gt;Merging mean keeping the order of observations by KEYs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By SET you concatenate the data sets (appending them) in the original order.&lt;/P&gt;
&lt;P&gt;Finally you can &lt;STRONG&gt;sort&lt;/STRONG&gt; it by KEYs to get same result as by using MERGE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 06:59:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merge-or-set-for-combining-data/m-p/702981#M25969</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-12-02T06:59:51Z</dc:date>
    </item>
  </channel>
</rss>

