<?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: Help converting ROW_NUMBER() OVER (PARTITION BY in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/516096#M73256</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/241054"&gt;@OsiasEduardo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Good afternoon!&lt;BR /&gt;Have you solved the case? I have the same arithmetic overflow problem.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This post has nothing to do with arithmetic overflow. Please post your question as a new post.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Nov 2018 19:29:33 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-11-26T19:29:33Z</dc:date>
    <item>
      <title>Help converting ROW_NUMBER() OVER (PARTITION BY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/418224#M67721</link>
      <description>&lt;P&gt;Could someone please help me to understand how I could convert the following into PROC SORT then PROC RANK?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ROW_NUMBER() OVER (PARTITION BY UNIQUE_ID ORDER BY mem_no desc, drug_id desc, RX_FILL_DT ASC) AS RANK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI, formats:&lt;/P&gt;&lt;P&gt;alphanumeric:&lt;/P&gt;&lt;P&gt;UNIQUE_ID&amp;nbsp;&lt;/P&gt;&lt;P&gt;DRUG_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;date:&lt;/P&gt;&lt;P&gt;RX_FILL_DT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;numeric:&lt;/P&gt;&lt;P&gt;MEM_NO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS EG v. 7.13&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 17:23:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/418224#M67721</guid>
      <dc:creator>vanpeltm1785</dc:creator>
      <dc:date>2017-12-04T17:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting ROW_NUMBER() OVER (PARTITION BY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/418225#M67722</link>
      <description>&lt;P&gt;PROC SORT data=have;&lt;/P&gt;
&lt;P&gt;by&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;mem_no desc descending drug_id&amp;nbsp; RX_FILL_DT ASC;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc rank data=have;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;by &amp;lt; ... &amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;VAR ...;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm not sure what variable is being ranked here or if it's just creating a count variable per group. I suspect the latter which would be easier in a data step.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;

by &amp;lt;   &amp;gt;;

if first rx_fill_dt_asc then count=0;
count+1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Dec 2017 17:28:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/418225#M67722</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-04T17:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting ROW_NUMBER() OVER (PARTITION BY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/418230#M67725</link>
      <description>I get this error:&lt;BR /&gt;&lt;BR /&gt;if first rx_fill_dt_asc then count=0;&lt;BR /&gt;______________&lt;BR /&gt;388&lt;BR /&gt;76&lt;BR /&gt;ERROR 388-185: Expecting an arithmetic operator.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Dec 2017 17:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/418230#M67725</guid>
      <dc:creator>vanpeltm1785</dc:creator>
      <dc:date>2017-12-04T17:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting ROW_NUMBER() OVER (PARTITION BY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/418237#M67727</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if first.rx_fill_dt_asc ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think auto correct deleted the period, there should be a period between.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FIRST. identifies the first in that particular variable group.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 17:42:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/418237#M67727</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-04T17:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting ROW_NUMBER() OVER (PARTITION BY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/516001#M73254</link>
      <description>&lt;P&gt;Good afternoon!&lt;BR /&gt;Have you solved the case? I have the same arithmetic overflow problem.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 14:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/516001#M73254</guid>
      <dc:creator>OsiasEduardo</dc:creator>
      <dc:date>2018-11-26T14:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting ROW_NUMBER() OVER (PARTITION BY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/516096#M73256</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/241054"&gt;@OsiasEduardo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Good afternoon!&lt;BR /&gt;Have you solved the case? I have the same arithmetic overflow problem.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This post has nothing to do with arithmetic overflow. Please post your question as a new post.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 19:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-converting-ROW-NUMBER-OVER-PARTITION-BY/m-p/516096#M73256</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-26T19:29:33Z</dc:date>
    </item>
  </channel>
</rss>

