<?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? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126740#M34798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so the first data set is the master list and cannot have any duplicated MRNs.&amp;nbsp; The second data set can have multiple observations per MRN.&amp;nbsp; Any MRN in the second data but not in the first automatically gets added to the final data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The UPDATE statement requires both data set names (master first, transaction second). So obs=0 just creates an empty master data set, but with exactly the same variable definitions as in the transaction data set.&amp;nbsp; The name of a master data set is required by UPDATE, but it doesn't have to actually hold any data.&amp;nbsp; All the data will come from the transaction data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 May 2013 16:33:04 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2013-05-01T16:33:04Z</dc:date>
    <item>
      <title>Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126733#M34791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have duplicates by mrn&lt;/P&gt;&lt;P&gt;i want no duplicates by mrn as shown below and wanted everything to be fitted in a single row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that possible?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi I have &lt;BR /&gt;mrn&amp;nbsp;&amp;nbsp;&amp;nbsp; in1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out3&lt;/P&gt;&lt;P&gt;101&amp;nbsp;&amp;nbsp;&amp;nbsp; time1&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time3&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time5&lt;/P&gt;&lt;P&gt;101&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time2&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time4&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I want&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mrn&amp;nbsp;&amp;nbsp;&amp;nbsp; in1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out3&lt;/P&gt;&lt;P&gt;101&amp;nbsp;&amp;nbsp;&amp;nbsp; time1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time4&amp;nbsp;&amp;nbsp; time5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time6&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 15:09:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126733#M34791</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-05-01T15:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126734#M34792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is possible, look up retain and lag. &lt;/P&gt;&lt;P&gt;&lt;A href="http://changchung.com/download/retainLagLeadInterleave_draft.pdf" title="http://changchung.com/download/retainLagLeadInterleave_draft.pdf"&gt;http://changchung.com/download/retainLagLeadInterleave_draft.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 15:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126734#M34792</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-05-01T15:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126735#M34793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An easy way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; update have (obs=0) have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by mrn;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you're going to want to understand the tools and how they work, you are better off studying Reeza's link.&amp;nbsp; Those tools are more important than this program.&amp;nbsp; Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ooops ... Looks like I'm a little slow on the draw today!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 15:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126735#M34793</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-05-01T15:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126736#M34794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Ooops ... Looks like I'm a little slow on the draw today!" &lt;/P&gt;&lt;P&gt;Not anymore. Your post has more information, deserves "shoot and kill". &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 15:53:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126736#M34794</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-05-01T15:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126737#M34795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for the help..&lt;/P&gt;&lt;P&gt;Why is the obs=0 used&lt;/P&gt;&lt;P&gt;and why only for one of the two have datasets????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 15:54:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126737#M34795</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-05-01T15:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126738#M34796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're confident that you understand how the UPDATE statement works, I can answer that.&amp;nbsp; But if not, you are better off studying other tools such as Reeza's link.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 16:13:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126738#M34796</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-05-01T16:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126739#M34797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I do..&lt;/P&gt;&lt;P&gt;It updates the dataset with the by variable...&lt;/P&gt;&lt;P&gt;so if there is missing out1 in the first dataset (101) and i the second dataset (101) has a value then&lt;/P&gt;&lt;P&gt;it updates the inforamtion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 16:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126739#M34797</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-05-01T16:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126740#M34798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so the first data set is the master list and cannot have any duplicated MRNs.&amp;nbsp; The second data set can have multiple observations per MRN.&amp;nbsp; Any MRN in the second data but not in the first automatically gets added to the final data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The UPDATE statement requires both data set names (master first, transaction second). So obs=0 just creates an empty master data set, but with exactly the same variable definitions as in the transaction data set.&amp;nbsp; The name of a master data set is required by UPDATE, but it doesn't have to actually hold any data.&amp;nbsp; All the data will come from the transaction data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 16:33:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126740#M34798</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-05-01T16:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126741#M34799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much..&lt;/P&gt;&lt;P&gt;Reezas notes was helpful too..But I did not know which part of that notes is useful..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great Help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 16:42:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126741#M34799</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-05-01T16:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Merge?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126742#M34800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I am always late due to in another time zone.&lt;/P&gt;&lt;P&gt;To OP, If you cann't understand what UPDATE is doing, and your variables are all numeric. Here is a more explicit way you might see .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc means data=have;&lt;/P&gt;&lt;P&gt;by mrn;&lt;/P&gt;&lt;P&gt;var in: out: ;&lt;/P&gt;&lt;P&gt;output out=want sum= ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 01:54:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge/m-p/126742#M34800</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-05-02T01:54:54Z</dc:date>
    </item>
  </channel>
</rss>

