<?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: ROW_NUMBER() in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704364#M215927</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
by member_key;
if first.member_key
then counter = 1;
else counter + 1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 08 Dec 2020 07:11:17 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-12-08T07:11:17Z</dc:date>
    <item>
      <title>ROW_NUMBER() in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704361#M215925</link>
      <description>&lt;P&gt;I have following sql code that i want to do it in sas datastep.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ROW_NUMBER() OVER(PARTITION BY member_key ORDER BY 
joindate asc, (case when status='Existing' then 1 when Status='Pending' then 2 else 3 end) asc,
savings desc) as CustRank&lt;/PRE&gt;&lt;P&gt;How we can do this in sas datastep need some help here.. It would be great if anyone post solution here with example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 06:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704361#M215925</guid>
      <dc:creator>Son_Of_Krypton</dc:creator>
      <dc:date>2020-12-08T06:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: ROW_NUMBER() in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704363#M215926</link>
      <description>&lt;P&gt;I don't know what the function row_number() exactly does, but maybe &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=casdspgm&amp;amp;docsetTarget=p1myr5r0z9n55vn1c0ijy5wt6f8g.htm&amp;amp;locale=en#n1fgpzk1m0yisyn1i1cnsu1143rg" target="_self"&gt;_n_&lt;/A&gt; is what you are looking for.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 07:06:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704363#M215926</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-12-08T07:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: ROW_NUMBER() in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704364#M215927</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
by member_key;
if first.member_key
then counter = 1;
else counter + 1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Dec 2020 07:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704364#M215927</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-08T07:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: ROW_NUMBER() in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704367#M215929</link>
      <description>&lt;P&gt;but in Row_Number() there are several columns which are cimbined in CustRank column&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 07:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704367#M215929</guid>
      <dc:creator>Son_Of_Krypton</dc:creator>
      <dc:date>2020-12-08T07:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: ROW_NUMBER() in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704371#M215933</link>
      <description>&lt;P&gt;Please supply source data in usable form (data step with datalines), and what you expect out of it.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 08:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704371#M215933</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-08T08:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: ROW_NUMBER() in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704458#M215954</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/190967"&gt;@Son_Of_Krypton&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;but in Row_Number() there are several columns which are cimbined in CustRank column&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Which leads to more variables on the BY statement and modifications to first.logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Really need to provide examples of your data and expected results. I have no access to any SQL with this (mythical to me) Row_number function or "Partition over" operation so cannot tell what you expect in any case.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 17:16:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ROW-NUMBER-in-sas/m-p/704458#M215954</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-08T17:16:24Z</dc:date>
    </item>
  </channel>
</rss>

