<?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: Looking for YTD Claim Spend in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155188#M298743</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could "A.CLM_PD_DT"&amp;nbsp; be a "datetime" variable instead of "date" variable? Add&amp;nbsp; datepart( A.CLM_PD_DT) to see if produce what you are expecting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2014 14:12:51 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2014-06-25T14:12:51Z</dc:date>
    <item>
      <title>Looking for YTD Claim Spend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155184#M298739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking for members with over X$ claims in 2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This query is pulling the members but is not filtering only to 2014, do I not have the date in the correct place?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table TOTAL_PAID as SELECT DISTINCT MBR_SYS_ID,&lt;/P&gt;&lt;P&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; SUM(SRC_PD_AMT) as TOTAL_CLAIMS FROM DB2.INS_CLAIM A&lt;/P&gt;&lt;P&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; WHERE A.CLM_PD_DT &amp;gt;= '01JAN2014'd&amp;nbsp; and A.SRVC_CURR_IND = 'Y' and A.ENCTR_CD NOT IN('3','4','U') and A.TRANS_CD ='00'&lt;/P&gt;&lt;P&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; group by MBR_SYS_ID&lt;/P&gt;&lt;P&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; having TOTAL_CLAIMS &amp;gt; 100000;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 13:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155184#M298739</guid>
      <dc:creator>jls954</dc:creator>
      <dc:date>2014-06-25T13:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for YTD Claim Spend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155185#M298740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you need to subclause the where statement, then this would feed back into your outer loop for grouping.&amp;nbsp; Also, if you are still not getting anything then copy the subclause with the where into another proc sql, see what it returns.&amp;nbsp; Also you can try dropping the having and seeing what you get then.&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table TOTAL_PAID as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT DISTINCT MBR_SYS_ID,&lt;/P&gt;&lt;P&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;&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; SUM(SRC_PD_AMT) as TOTAL_CLAIMS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select *&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; from DB2.INS_CLAIM &lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE A.CLM_PD_DT &amp;gt;= '01JAN2014'd&amp;nbsp; and A.SRVC_CURR_IND = 'Y' and A.ENCTR_CD NOT IN('3','4','U') and A.TRANS_CD ='00') A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by MBR_SYS_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; having TOTAL_CLAIMS &amp;gt; 100000;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 13:32:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155185#M298740</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-06-25T13:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for YTD Claim Spend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155186#M298741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure you have members with total claims more than 100000 in 2014?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 13:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155186#M298741</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-06-25T13:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for YTD Claim Spend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155187#M298742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I am trying to narrow down because I am returning many with over $1million because its pulling in 2012, 2013 etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 14:09:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155187#M298742</guid>
      <dc:creator>jls954</dc:creator>
      <dc:date>2014-06-25T14:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for YTD Claim Spend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155188#M298743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could "A.CLM_PD_DT"&amp;nbsp; be a "datetime" variable instead of "date" variable? Add&amp;nbsp; datepart( A.CLM_PD_DT) to see if produce what you are expecting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 14:12:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155188#M298743</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-06-25T14:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for YTD Claim Spend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155189#M298744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, reran and checked------the total amount of claim spend is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The query is returning all claims regardless of date but only calculating the total on 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to remove the results that are not applicable (2012-2013)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 16:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-YTD-Claim-Spend/m-p/155189#M298744</guid>
      <dc:creator>jls954</dc:creator>
      <dc:date>2014-06-25T16:20:42Z</dc:date>
    </item>
  </channel>
</rss>

