<?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: Want to have only unique rows in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198418#M49598</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course the question is always HOW will you use the result? A vast majority of processes work much better with data in your original form (which shows a level of something called normalization in the database world), so don't lose it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2015 15:27:43 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-08-13T15:27:43Z</dc:date>
    <item>
      <title>Want to have only unique rows</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198416#M49596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset with IDs and some variables. Currently the IDs are not unique and may repeat example data below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="197"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="64"&gt;ID&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;Date&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Dx&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;1/1/2001&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;5/7/2009&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;3/4/1989&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;9/18/2013&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;7/2/2011&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;8/9/1956&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;10/1/2001&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;&lt;P&gt;D&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to write code to make the dataset look like below instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="463"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="64"&gt;ID&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;Date&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Dx&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;Date2&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;Dx2&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Date3&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Dx3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;3/4/1989&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;1/1/2001&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl66" width="64"&gt;5/7/2009&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;7/2/2011&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;9/18/2013&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;B&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;8/9/1956&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;.&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;.&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;.&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" width="64"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl66" width="69"&gt;10/1/2001&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;D&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;.&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;.&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;.&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;&lt;P&gt;.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm fairly new to SAS but what I think might do it is a code that essentially says "if MRN is a duplicate and date1=. then date1=date else if MRN is a duplicate and date1 ne "." and date2=. then date2=date etc...". If there's a way to have the dates in chronological order that would be magical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems pretty messy/complicated so any guidance would really be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 14:32:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198416#M49596</guid>
      <dc:creator>LCart</dc:creator>
      <dc:date>2015-08-13T14:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Want to have only unique rows</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198417#M49597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can actually use the TRANSPOSE procedure and then merge the two data sets.&amp;nbsp; May have to change the reorder the columns to get it the way you want, but this will set it up initially for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://communities.sas.com/legacyfs/online/11378_pastedImage_0.png" style="width: 495px; height: 653px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 14:58:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198417#M49597</guid>
      <dc:creator>dcruik</dc:creator>
      <dc:date>2015-08-13T14:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Want to have only unique rows</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198418#M49598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course the question is always HOW will you use the result? A vast majority of processes work much better with data in your original form (which shows a level of something called normalization in the database world), so don't lose it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 15:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198418#M49598</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-08-13T15:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Want to have only unique rows</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198419#M49599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much dcruik for helping me think of the data another way!&lt;/P&gt;&lt;P&gt;Ballardw - to elaborate on my problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dateset with MRN numbers, dx codes, dates of diagnoses and dates of treatment. So patient 1 could be diagnosed with condition X on 1/15/2001, receive treatment Y on 1/25/2001. This person could later be diagnosed with condition Z on 5/16/2015, and receive treatment Y on 6/1/2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is create a dataset where each row represents a patient so that I can merge this information with other demographic information I have for the patients. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using dcruik's&amp;nbsp; thinking I sorted the data by mrn and diagnosis date. I created a macro and transposed the data for each variable. I then merged all of the newly created datasets by MRN number. I know this is clunky but it seems to have worked? I'm still checking for accuracy and would welcome suggestions if my process raises any immediate redflags!&lt;/P&gt;&lt;P&gt;Below is simplified/dummy data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;format MRN 3. DxDt mmddyy10. Dx $2. TX $4. TxDate mmddyy10.;&lt;/P&gt;&lt;P&gt;informat MRN 3. DxDt mmddyy10. Dx $2. TX $4. TxDate mmddyy10.;&lt;/P&gt;&lt;P&gt;input MRN DxDt Dx $ TX $ TxDate;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 1/15/2001 A Rad 2/1/2001&lt;/P&gt;&lt;P&gt;2 11/6/1999 A Sur 12/16/1999&lt;/P&gt;&lt;P&gt;2 7/11/2005 B Che 9/25/2005&lt;/P&gt;&lt;P&gt;1 4/2/2010 C Sur 6/8/2010&lt;/P&gt;&lt;P&gt;1 4/15/1989 D . .&lt;/P&gt;&lt;P&gt;3 9/17/2014 A Rad 9/20/2014&lt;/P&gt;&lt;P&gt;4 10/11/2007 B Che 11/1/2007&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;&lt;/P&gt;&lt;P&gt;proc sort data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by mrn dxdt;&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;%macro transpose(x);&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc transpose data=have out=want_&amp;amp;x (drop=_Name_)&lt;/P&gt;&lt;P&gt;&amp;nbsp; prefix=&amp;amp;x;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var &amp;amp;x;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by mrn;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%mend transpose;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%transpose(DxDt)&lt;/P&gt;&lt;P&gt;%transpose(Dx)&lt;/P&gt;&lt;P&gt;%transpose(TX)&lt;/P&gt;&lt;P&gt;%transpose(TxDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; merge&amp;nbsp; want_dxdt want_dx want_tx want_txdate;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by mrn;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 17:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198419#M49599</guid>
      <dc:creator>LCart</dc:creator>
      <dc:date>2015-08-13T17:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Want to have only unique rows</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198420#M49600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Creating so may variables from data is messy.&amp;nbsp; You can use the PROC SUMMARY trick if you have LE 100 obs per ID.&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; have;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; MRN &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3.&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; DxDt &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Dx &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$2.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; TX &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$4.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; TxDate &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;mmddyy10.&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;informat&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; MRN &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3.&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; DxDt &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Dx &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$2.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; TX &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$4.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; TxDate &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;mmddyy10.&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; MRN DxDt Dx $ TX $ TxDate;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;datalines&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffc0;"&gt;&amp;nbsp;&amp;nbsp; 1 1/15/2001 A Rad 2/1/2001&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 2 11/6/1999 A Sur 12/16/1999&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 2 7/11/2005 B Che 9/25/2005&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 1 4/2/2010 C Sur 6/8/2010&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 1 4/15/1989 D . .&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 3 9/17/2014 A Rad 9/20/2014&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 4 10/11/2007 B Che 11/1/2007&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=have;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; mrn dxdt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; obs=1;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;sql&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;noprint&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; max(obs) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; :obs &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; count(*) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; obs &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; have &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;group&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; mrn);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;quit&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;summary&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=have;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; mrn;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;output&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=wide(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=_type_)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;idgroup&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;[&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;obs&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;](dxdt--txdate)=);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;IMG alt="Capture.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/11383_Capture.PNG" width="450" /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 18:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Want-to-have-only-unique-rows/m-p/198420#M49600</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-08-13T18:17:48Z</dc:date>
    </item>
  </channel>
</rss>

