<?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  sum where in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226670#M308001</link>
    <description>&lt;P&gt;Your code appears to work correctly for me. Can you illustrate the issue with it?&lt;/P&gt;&lt;P&gt;You may want to verify your boundary conditions match your word statement, ie If year=2000 then year-1 and year-8 would be from 1999 to 1992 for your sample data which means&amp;nbsp;you would have a failure count of 2, not 1 as indicated.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Sep 2015 22:28:04 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-09-21T22:28:04Z</dc:date>
    <item>
      <title>PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226669#M308000</link>
      <description>&lt;P&gt;I want to calculate failures for past 7 years for a company. Following is the example set&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Have&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Year &amp;nbsp;Company &amp;nbsp; &amp;nbsp; failure &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1991 &amp;nbsp; A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;1992 &amp;nbsp; A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;1993 &amp;nbsp; A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;2000&amp;nbsp; &amp;nbsp;A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Want&lt;/P&gt;
&lt;P&gt;Year &amp;nbsp; Company &amp;nbsp; &amp;nbsp;failure &amp;nbsp; &amp;nbsp;count for past&amp;nbsp;7 years&lt;/P&gt;
&lt;P&gt;1991 &amp;nbsp; A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;
&lt;P&gt;1992 &amp;nbsp; A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;1993 &amp;nbsp; A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;2000 &amp;nbsp;A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written following code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;update want&amp;nbsp;as a &lt;BR /&gt;set failurecount&amp;nbsp;= (select coalesce(sum(failure),0) from have&amp;nbsp;where (Company&amp;nbsp;= a.Company) and Year between a.Year-8 and a.Year-1);&lt;/P&gt;
&lt;P&gt;quit;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ouptput is confusing. Somr records are populated with correct values while others are 0.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 22:18:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226669#M308000</guid>
      <dc:creator>buckeyefisher</dc:creator>
      <dc:date>2015-09-21T22:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226670#M308001</link>
      <description>&lt;P&gt;Your code appears to work correctly for me. Can you illustrate the issue with it?&lt;/P&gt;&lt;P&gt;You may want to verify your boundary conditions match your word statement, ie If year=2000 then year-1 and year-8 would be from 1999 to 1992 for your sample data which means&amp;nbsp;you would have a failure count of 2, not 1 as indicated.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 22:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226670#M308001</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-09-21T22:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226671#M308002</link>
      <description>&lt;P&gt;You may need to provide more input, the output for that input and more details as to what is incorrect.&lt;/P&gt;&lt;P&gt;Without more details I would suspect the issue may be the coded year range and the actual values for year.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 22:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226671#M308002</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-09-21T22:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226683#M308003</link>
      <description>&lt;P&gt;That does not look lke the type of query that you can do with an UPDATE statement.&lt;/P&gt;&lt;P&gt;Just make a normal query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input year company $ failure expect @@;
cards;
1991 A 1 0 1992 A 1 1 1993 A 1 2 2000 A 1 1
;;;;

proc sql ;
 create table want as
   select a.*
        , coalesce(sum(b.failure),0) as count
   from have a left join have b
     on a.company = b.company
     and b.year between a.year - 7 and a.year - 1
   group by a.company, a.year
   order by a.company, a.year
 ;
quit;
proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Sep 2015 05:58:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226683#M308003</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-09-22T05:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226698#M308004</link>
      <description>&lt;P&gt;The output is correct per your logic?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 08:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226698#M308004</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-09-22T08:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226821#M308005</link>
      <description>&lt;P&gt;This solution is very similar to Tom's SQL&amp;nbsp;solution, but it uses a subselect within a select.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA have;
length Year 8 Company $8 Failure 8;
input Year Company $ Failure;
datalines;
1991   A   1
1992   A   1
1993   A   1
2000   A   1
;
RUN;

PROC SQL;
  CREATE TABLE want AS 
  SELECT Year
       , Company
       , Failure
       , (SELECT COALESCE(SUM(Failure), 0)
          FROM have AS B
          WHERE A.Company = B.Company
            AND A.Year - B.Year BETWEEN 1 AND 7) AS Count_In_7_Years
  FROM have AS A;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A lookup within an update is possible, but you need to add your new field first using an ALTER TABLE statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you run the update statement&amp;nbsp;as-is, you will get&amp;nbsp;an error message that I have pasted below. You would&amp;nbsp;have&amp;nbsp;to uncomment the highlighted line to suppress the error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
  ALTER TABLE have
  ADD Count_In_7_Years num;
QUIT;

/* uncomment the next line to suppress the error */ 
&lt;SPAN style="background-color: yellow;"&gt;/* &lt;STRONG&gt;OPTIONS SQLUNDOPOLICY=NONE;&lt;/STRONG&gt; */ &lt;/SPAN&gt;
PROC SQL;
  UPDATE have AS A
  SET Count_In_7_Years = (SELECT COALESCE(SUM(Failure), 0)
                          FROM have AS B
                          WHERE A.Company = B.Company
                            AND A.Year - B.Year BETWEEN 1 AND 7);
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;WARNING: A value expression of the SET clause references the data set being updated.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;ERROR: You cannot reopen WORK.HAVE.DATA for update access with member-level control because WORK.HAVE.DATA is in use by you in &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;resource environment SQL (2).&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;ERROR: PROC SQL could not undo this statement if an ERROR were to happen as it could not obtain exclusive access to the data set. &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt; This statement will not execute as the SQL option UNDO_POLICY=REQUIRED is in effect.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 22:06:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226821#M308005</guid>
      <dc:creator>hbi</dc:creator>
      <dc:date>2015-09-22T22:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226853#M308006</link>
      <description>&lt;P&gt;Two things to note there:&lt;/P&gt;&lt;P&gt;- It is called a SubQuery.&lt;/P&gt;&lt;P&gt;- The warning is there for a reason. &amp;nbsp;This is not an SQL system, SAS likes to have sole access to a dataset for operation. &amp;nbsp;Opening the dataset within a SubQuery in this manner will mean you have that dataset open twice, once for reading, once for writing, both in memory. &amp;nbsp;Which will ruin memory usage if your data is large. &amp;nbsp;Better to create a new dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2015 08:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226853#M308006</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-09-23T08:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226924#M308007</link>
      <description>&lt;P&gt;Completely different solution but I think it works for your issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;infile cards dsd;&lt;BR /&gt;input year company$ failure;&lt;BR /&gt;cards;&lt;BR /&gt;1991,A,1&lt;BR /&gt;1992,A,1&lt;BR /&gt;1993,A,1&lt;BR /&gt;2000,A,1&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;by company;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;%macro lag;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;%do i = 1 %to 7;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;_lyear&amp;amp;i = lag&amp;amp;i(year);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if _lyear&amp;amp;i &amp;lt; year - 7 then _lyear&amp;amp;i = .;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else _lyear&amp;amp;i = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;%end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;%mend;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;%lag;&lt;BR /&gt;count = sum(of _lyear1 - _lyear7);&lt;BR /&gt;drop _:;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2015 16:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226924#M308007</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-09-23T16:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226997#M308008</link>
      <description>&lt;P&gt;Yes RW9, very true.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I posted on a different thread ( &lt;A title="PROC SQL update workaround" href="https://communities.sas.com/t5/Base-SAS-Programming/Problem-with-PROC-SQL-UPDATE/m-p/225920#U225920" target="_self"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Problem-with-PROC-SQL-UPDATE/m-p/225920#U225920&lt;/A&gt; ) that had a related&amp;nbsp;problem, but the problem appeared to be magnified because&amp;nbsp;the same dataset was being referenced in both the "set" clause and the "where" clause.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-- hbi &lt;img id="robothappy" class="emoticon emoticon-robothappy" src="https://communities.sas.com/i/smilies/16x16_robot-happy.png" alt="Robot Happy" title="Robot Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2015 21:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/226997#M308008</guid>
      <dc:creator>hbi</dc:creator>
      <dc:date>2015-09-23T21:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/227005#M308009</link>
      <description>&lt;P&gt;I would never consider using PROC SQL to do this type of thing. &amp;nbsp;I would consider just treating SQL as a query tool, it wasn't called Structured Query Language by mistake. &amp;nbsp;If you want to do data management activities in SAS then use things like the MODIFY command. Other system that have been built using on SQL as the users programming language might have made optimizations&amp;nbsp;and enhancements to SQL to allow you to use it for Data Management, but SQL is not the base language of SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2015 22:21:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/227005#M308009</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-09-23T22:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/227138#M308010</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm not as well-versed in SQL as some of you and I needed to be able to visualize it better to get the results, so I used a combination of data step programming and SQL. &amp;nbsp;I believe&amp;nbsp;it produces the desired results. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* reference table */ &lt;BR /&gt;DATA have(rename = (year = ref_year&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failure = ref_failure));&lt;BR /&gt;&amp;nbsp; &amp;nbsp; length Year 8 Company $8 Failure 8;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; input Year Company $ Failure;&lt;BR /&gt;datalines;&lt;BR /&gt;1991 A 1&lt;BR /&gt;1992 A 1&lt;BR /&gt;1993 A 1&lt;BR /&gt;2000 A 1&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* comparison table */ &lt;BR /&gt;data have2;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; set have (rename = (ref_year = comp_year&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;company = comp_company&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ref_failure = comp_failure));&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* full join to visualize reference year and comparison years */ &lt;BR /&gt;proc sql;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; create table temp1 as&lt;BR /&gt;&amp;nbsp; &amp;nbsp; select a.ref_year, a.company, a.ref_failure, b.comp_year, b.comp_failure &lt;BR /&gt;&amp;nbsp; &amp;nbsp; from have as a full join have2 as b&lt;BR /&gt;&amp;nbsp; &amp;nbsp; on a.company = b.comp_company&lt;BR /&gt;&amp;nbsp; &amp;nbsp; order by company, ref_year, comp_year;&lt;BR /&gt;quit; &lt;BR /&gt; &lt;BR /&gt;/* do comparison, increment count, output last in group */ &lt;BR /&gt;data want (drop = comp_year comp_failure);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; set temp1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; by company ref_year comp_year;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; retain countf 0;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if first.company or first.ref_year then countf = 0;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if (ref_year-7) le comp_year le (ref_year-1) then countf = countf + comp_failure;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if last.ref_year then output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 18:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/227138#M308010</guid>
      <dc:creator>evp000</dc:creator>
      <dc:date>2015-09-24T18:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL  sum where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/228434#M308011</link>
      <description>&lt;P&gt;My code was write just that input date had some issues. Now it works. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I agree with Tom that SQL may not be the best way to modify. For this&amp;nbsp;simple updation, my program takes around 20 to 25 minutes.&lt;/P&gt;
&lt;P&gt;There are many more calculations lined up and I can not imagine spending a day to get the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me try MODIFY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks all. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 14:14:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-sum-where/m-p/228434#M308011</guid>
      <dc:creator>buckeyefisher</dc:creator>
      <dc:date>2015-10-05T14:14:09Z</dc:date>
    </item>
  </channel>
</rss>

