<?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: Proc sql in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299045#M60394</link>
    <description>Why are you fixed to SQL?&lt;BR /&gt;This is row type query, whoch is not a good match for SQL. Try the data step instead.</description>
    <pubDate>Fri, 16 Sep 2016 21:19:57 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2016-09-16T21:19:57Z</dc:date>
    <item>
      <title>Proc Sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299034#M60390</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data like this in the database&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; date &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;date9.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Account $ Score Date;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; date &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;date9.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cards&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;A1 0 30-Apr-15&lt;/P&gt;&lt;P&gt;A1 0 31-May-15&lt;/P&gt;&lt;P&gt;A1 0 30-Jun-15&lt;/P&gt;&lt;P&gt;A1 1 31-Jul-15&lt;/P&gt;&lt;P&gt;A1 2 31-Aug-15&lt;/P&gt;&lt;P&gt;A1 3 30-Sep-15&lt;/P&gt;&lt;P&gt;A1 4 31-Oct-15&lt;/P&gt;&lt;P&gt;A1 5 30-Nov-15&lt;/P&gt;&lt;P&gt;A2 0 31-Jan-14&lt;/P&gt;&lt;P&gt;A2 0 28-Feb-14&lt;/P&gt;&lt;P&gt;A2 2 31-Mar-14&lt;/P&gt;&lt;P&gt;A2 3 30-Apr-14&lt;/P&gt;&lt;P&gt;A2 4 31-May-14&lt;/P&gt;&lt;P&gt;A2 5 30-Jun-14&lt;/P&gt;&lt;P&gt;A3 1 28-Feb-13&lt;/P&gt;&lt;P&gt;A3 2 31-Mar-13&lt;/P&gt;&lt;P&gt;A3 3 30-Apr-13&lt;/P&gt;&lt;P&gt;A4 0 31-Jan-16&lt;/P&gt;&lt;P&gt;A4 0 29-Feb-16&lt;/P&gt;&lt;P&gt;A4 0 31-Mar-16&lt;/P&gt;&lt;P&gt;A4 0 30-Apr-16&lt;/P&gt;&lt;P&gt;A4 3 31-May-16&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;and I wanted to pull only first record when score &amp;gt; 0&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Resuling output looks like below&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;Account&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Score Date&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;A1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;31&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;-Jul-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;15&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;A2 &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;31&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;-Mar-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;14&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;A3 &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;28&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;-Feb-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;13&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;A4 &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;31&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;-May-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;16&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When I pull the data I need to pull whole history of the account and after I need to get first record.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you in advance&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:34:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299034#M60390</guid>
      <dc:creator>umesh1</dc:creator>
      <dc:date>2016-09-16T20:34:07Z</dc:date>
    </item>
    <item>
      <title>Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299038#M60393</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the data like below in the database. I just need to pull the first record when score is greater than zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; date &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;date9.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Account $ Score Date;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; date &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;date9.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cards&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;A1 0 30-Apr-15&lt;/P&gt;&lt;P&gt;A1 0 31-May-15&lt;/P&gt;&lt;P&gt;A1 0 30-Jun-15&lt;/P&gt;&lt;P&gt;A1 1 31-Jul-15&lt;/P&gt;&lt;P&gt;A1 2 31-Aug-15&lt;/P&gt;&lt;P&gt;A1 3 30-Sep-15&lt;/P&gt;&lt;P&gt;A1 4 31-Oct-15&lt;/P&gt;&lt;P&gt;A1 5 30-Nov-15&lt;/P&gt;&lt;P&gt;A2 0 31-Jan-14&lt;/P&gt;&lt;P&gt;A2 0 28-Feb-14&lt;/P&gt;&lt;P&gt;A2 2 31-Mar-14&lt;/P&gt;&lt;P&gt;A2 3 30-Apr-14&lt;/P&gt;&lt;P&gt;A2 4 31-May-14&lt;/P&gt;&lt;P&gt;A2 5 30-Jun-14&lt;/P&gt;&lt;P&gt;A3 1 28-Feb-13&lt;/P&gt;&lt;P&gt;A3 2 31-Mar-13&lt;/P&gt;&lt;P&gt;A3 3 30-Apr-13&lt;/P&gt;&lt;P&gt;A4 0 31-Jan-16&lt;/P&gt;&lt;P&gt;A4 0 29-Feb-16&lt;/P&gt;&lt;P&gt;A4 0 31-Mar-16&lt;/P&gt;&lt;P&gt;A4 0 30-Apr-16&lt;/P&gt;&lt;P&gt;A4 3 31-May-16&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;resulting data looks like below&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;Account&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Score Date&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;A1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;31&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;-Jul-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;15&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;A2 &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;31&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;-Mar-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;14&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;A3 &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;28&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;-Feb-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;13&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;A4 &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;31&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;-May-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;16&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;when I pull from the database I need to pull entire history of the acccount and after that I need to filter out. Is there any way to tell proc sql to stop at the score greater than zero.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you in advance&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299038#M60393</guid>
      <dc:creator>umesh1</dc:creator>
      <dc:date>2016-09-16T20:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299045#M60394</link>
      <description>Why are you fixed to SQL?&lt;BR /&gt;This is row type query, whoch is not a good match for SQL. Try the data step instead.</description>
      <pubDate>Fri, 16 Sep 2016 21:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299045#M60394</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-09-16T21:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299046#M60395</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have;
by account date;
run;

data want;
set have;
where score ne 0;
by account date;
if first.account;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Much, much easier in a data step.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 21:27:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299046#M60395</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-16T21:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299075#M60399</link>
      <description>&lt;PRE&gt;
It is not good for SQL.

data test;
informat date date9.;
input Account $ Score Date;
format date date9.;
cards;
A1 0 30-Apr-15
A1 0 31-May-15
A1 0 30-Jun-15
A1 1 31-Jul-15
A1 2 31-Aug-15
A1 3 30-Sep-15
A1 4 31-Oct-15
A1 5 30-Nov-15
A2 0 31-Jan-14
A2 0 28-Feb-14
A2 2 31-Mar-14
A2 3 30-Apr-14
A2 4 31-May-14
A2 5 30-Jun-14
A3 1 28-Feb-13
A3 2 31-Mar-13
A3 3 30-Apr-13
A4 0 31-Jan-16
A4 0 29-Feb-16
A4 0 31-Mar-16
A4 0 30-Apr-16
A4 3 31-May-16
;
run;
data want;
 set test;
 by account;
 retain found 0;
 if first.account then found=0;
 if score gt 0 and not found then do;output;found=1;end;
 drop found;
run;


&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Sep 2016 03:16:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299075#M60399</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-09-17T03:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299180#M60414</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I cannot use the data step while I am pulling from the data base because I need to pull another variables together.&lt;BR /&gt;&lt;BR /&gt;Guide me please.</description>
      <pubDate>Sun, 18 Sep 2016 20:48:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299180#M60414</guid>
      <dc:creator>umesh1</dc:creator>
      <dc:date>2016-09-18T20:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299183#M60416</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/72037"&gt;@umesh1&lt;/a&gt; wrote:&lt;BR /&gt;Hi&lt;BR /&gt;&lt;BR /&gt;I cannot use the data step while I am pulling from the data base because I need to pull another variables together.&lt;BR /&gt;&lt;BR /&gt;Guide me please.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thats not clear.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc sql;&lt;/P&gt;
&lt;P&gt;select *&lt;/P&gt;
&lt;P&gt;from have&lt;/P&gt;
&lt;P&gt;group by account&lt;/P&gt;
&lt;P&gt;where score &amp;gt;0 and date=Min(date);&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2016 22:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Sql/m-p/299183#M60416</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-18T22:33:52Z</dc:date>
    </item>
  </channel>
</rss>

