<?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 How to find even records ,odd records using only proc sql ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-even-records-odd-records-using-only-proc-sql/m-p/647300#M193707</link>
    <description />
    <pubDate>Wed, 13 May 2020 03:45:41 GMT</pubDate>
    <dc:creator>Saikiran_Mamidi</dc:creator>
    <dc:date>2020-05-13T03:45:41Z</dc:date>
    <item>
      <title>How to find even records ,odd records using only proc sql ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-even-records-odd-records-using-only-proc-sql/m-p/647300#M193707</link>
      <description />
      <pubDate>Wed, 13 May 2020 03:45:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-even-records-odd-records-using-only-proc-sql/m-p/647300#M193707</guid>
      <dc:creator>Saikiran_Mamidi</dc:creator>
      <dc:date>2020-05-13T03:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to find even records ,odd records using only proc sql ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-even-records-odd-records-using-only-proc-sql/m-p/647311#M193712</link>
      <description>&lt;P&gt;SQL has no concept of row order, and the order is never guaranteed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use a data step instead.&lt;/P&gt;
&lt;P&gt;For SQL, this not-recommended code might help:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  select monotonic() as M, mod(calculated M, 2) as ODD
  from SASHELP.CLASS;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 05:53:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-even-records-odd-records-using-only-proc-sql/m-p/647311#M193712</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-05-13T05:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to find even records ,odd records using only proc sql ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-even-records-odd-records-using-only-proc-sql/m-p/647314#M193713</link>
      <description>&lt;P&gt;Please try the below code with mod function to generate the odd and even row tables by proc sql&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table odd as SELECT * FROM (select *, monotonic() as row from sashelp.class ) where mod(row,2)&amp;lt;&amp;gt;0;
create table even as SELECT * FROM (select *, monotonic() as row from sashelp.class ) where mod(row,2)=0;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 May 2020 06:00:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-even-records-odd-records-using-only-proc-sql/m-p/647314#M193713</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-05-13T06:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to find even records ,odd records using only proc sql ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-even-records-odd-records-using-only-proc-sql/m-p/647571#M193822</link>
      <description>&lt;P&gt;What does your input look like, or an example, and what should the output look like?&lt;/P&gt;
&lt;P&gt;There can be more than one interpretation of your subject line.&lt;/P&gt;
&lt;P&gt;It could be "is the record order value even/odd"&lt;/P&gt;
&lt;P&gt;It could be the record number is even/odd (not always the same thing with deleted information)&lt;/P&gt;
&lt;P&gt;Is the value of some variable, or combination of variables even/odd.&lt;/P&gt;
&lt;P&gt;Is the explicit value of some variable (or variables) the text "even" or "odd".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I suspect that if I spent some time I might come up with a few more. So something specific might be a good idea.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 18:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-even-records-odd-records-using-only-proc-sql/m-p/647571#M193822</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-13T18:31:10Z</dc:date>
    </item>
  </channel>
</rss>

