<?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 NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression. ERROR: Result of WHEN clause 2 is not the same data type as the preceding results. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168094#M263978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Please guide me with these-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this code-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc sql;&lt;/P&gt;&lt;P&gt;create table Table2 as&amp;nbsp; &lt;/P&gt;&lt;P&gt;Select Week1&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;,week2&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;count(distinct case when trim(order)= 'New' then Cust end) as Var1&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;count(distinct case when trim(order)= 'New' then order1 else 0 end) as Neworder&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum(case when trim(order)= 'New' then quantity else 0 end) as Newquan&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum(case when trim(order)= 'New' then amount else 0 end) as Newamt,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Table1&lt;/P&gt;&lt;P&gt;Group by week1&amp;nbsp; , week2;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the following error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; result in a missing value for the CASE expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I am getting this error in other part of the code.&lt;/P&gt;&lt;P&gt;ERROR: The SUM summary function requires a numeric argument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Dipu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Feb 2014 02:02:19 GMT</pubDate>
    <dc:creator>Dipu</dc:creator>
    <dc:date>2014-02-09T02:02:19Z</dc:date>
    <item>
      <title>NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression. ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168094#M263978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Please guide me with these-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this code-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc sql;&lt;/P&gt;&lt;P&gt;create table Table2 as&amp;nbsp; &lt;/P&gt;&lt;P&gt;Select Week1&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;,week2&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;count(distinct case when trim(order)= 'New' then Cust end) as Var1&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;count(distinct case when trim(order)= 'New' then order1 else 0 end) as Neworder&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum(case when trim(order)= 'New' then quantity else 0 end) as Newquan&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum(case when trim(order)= 'New' then amount else 0 end) as Newamt,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Table1&lt;/P&gt;&lt;P&gt;Group by week1&amp;nbsp; , week2;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the following error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; result in a missing value for the CASE expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I am getting this error in other part of the code.&lt;/P&gt;&lt;P&gt;ERROR: The SUM summary function requires a numeric argument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Dipu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 02:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168094#M263978</guid>
      <dc:creator>Dipu</dc:creator>
      <dc:date>2014-02-09T02:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression. ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168095#M263979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If &lt;STRONG&gt;Cust&lt;/STRONG&gt; is numeric, replace &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;case when trim(order)= 'New' then Cust end&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;case when trim(order)= 'New' then Cust else . end&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if &lt;STRONG&gt;Cust&lt;/STRONG&gt; is character, replace it with&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;case when trim(order)= 'New' then Cust else "" end&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check that &lt;STRONG&gt;order1&lt;/STRONG&gt;, &lt;STRONG&gt;quantity&lt;/STRONG&gt; and &lt;STRONG&gt;amount&lt;/STRONG&gt; are numeric. In the case expressions the type of what you put after &lt;STRONG&gt;THEN&lt;/STRONG&gt; must be the same as the type of what appears after &lt;STRONG&gt;ELSE&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 03:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168095#M263979</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-02-09T03:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression. ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168096#M263980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much PG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Proc sql;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;create table Table2 as &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Select Week1&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;,week2&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;count(distinct case when trim(order)= 'New' then Cust end) as Var1&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&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; *** Cust is numeric***;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;count(distinct case when trim(order)= 'New' then order1 else 0 end) as Neworder&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***Problem lies here order1 is char&amp;nbsp;&amp;nbsp; instead of &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;count(distinct case when trim(order)= 'New' then order1 else 0 end) as Neworder&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: inherit;"&gt;I used &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;count(distinct case when trim(order)= 'New' then order1 else "" end) as Neworder&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: inherit;"&gt; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;***;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;sum(case when trim(order)= 'New' then quantity else 0 end) as Newquan&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;sum(case when trim(order)= 'New' then amount else 0 end) as Newamt,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;From Table1&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Group by week1&amp;nbsp; , week2;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;But now I am getting this error-&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;for the statement-&lt;/P&gt;&lt;TABLE height="34" style="height: 36px; width: 530px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;,sum(case when trim(order)= 'New' then order1 else 0 end) as Exorders&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where order is char but it contains values like PL123, PL435, PL433 and order1&amp;nbsp; is char.&lt;/P&gt;&lt;P&gt;Please guide&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 03:56:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168096#M263980</guid>
      <dc:creator>Dipu</dc:creator>
      <dc:date>2014-02-09T03:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression. ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168097#M263981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Try this. If it doesn't work, please post log.&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Proc sql;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;create table Table2 as&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Select Week1&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;, week2&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;count(distinct case when trim(order)= 'New' then Cust &lt;SPAN style="color: #800000;"&gt;&lt;STRONG&gt;else .&lt;/STRONG&gt;&lt;/SPAN&gt; end) as Var1&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;count(distinct case when trim(order)= 'New' then order1 else &lt;SPAN style="color: #800000;"&gt;&lt;STRONG&gt;" "&lt;/STRONG&gt;&lt;/SPAN&gt; end) as Neworder&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;sum(case when trim(order)= 'New' then quantity else 0 end) as Newquan&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;sum(case when trim(order)= 'New' then amount else 0 end) as Newamt&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;From Table1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Group by week1, week2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 04:19:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168097#M263981</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-02-09T04:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression. ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168098#M263982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello PG,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually What you mentioned in the previous reply helped me to solve my query. This is another problem in continuing the query &lt;BR /&gt;Please have a look on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,count(distinct case when trim(order)= 'Existing' then cust&amp;nbsp; end) as Exicust&amp;nbsp;&amp;nbsp; **It is working**;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,count(distinct case when trim(order)= 'Existing' then order1 else "" end) as Exiorder&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,sum(case when trim(order)= 'Existing' then order1 else 0 end) as Exi_orders&amp;nbsp;&amp;nbsp;&amp;nbsp; *** Here is the problem since order and order1 both are char and order1 has values like Pl123, pl345 etc.***(If I comment this line then it works)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,sum(case when trim(order)= 'Existing' then quantity else 0 end) as Exi_units&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,sum(case when trim(order)= 'Existing' then amount else 0 end) as Exi_dollars&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the log&lt;/P&gt;&lt;P&gt;ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.&lt;/P&gt;&lt;P&gt;ERROR: The SUM summary function requires a numeric argument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 05:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168098#M263982</guid>
      <dc:creator>Dipu</dc:creator>
      <dc:date>2014-02-09T05:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression. ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168099#M263983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not another problem. It is the same problem. The solutions explained above will work here too. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 16:33:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168099#M263983</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-02-09T16:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression. ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168100#M263984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello PG&lt;/P&gt;&lt;P&gt;Thank you for your suggestions.&lt;/P&gt;&lt;P&gt;Actually after using the same code as you said, it did reduced couple of errors but&amp;nbsp; am still getting errors for this-&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;,count(distinct case when trim(order)= 'Existing' then cust&amp;nbsp; end) as Exicust&amp;nbsp;&amp;nbsp; **It is working**;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; ,count(distinct case when trim(order)= 'Existing' then order1 else "" end) as Exiorder&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; &lt;STRONG&gt; ,sum(case when trim(order)= 'Existing' then order1 else " " end) as Exi_orders &lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; *** Here is the problem since order and order1 both are char and order1 has values like Pl123, pl345 etc.***(If I comment this line then it works)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; ,sum(case when trim(order)= 'Existing' then quantity else 0 end) as Exi_units&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; ,sum(case when trim(order)= 'Existing' then amount else 0 end) as Exi_dollars&lt;/P&gt;&lt;P&gt;I am getting this error-&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;for the bolded statement and if I comment that statement then the program runs successfully.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;ERROR: The SUM summary function requires a numeric argument.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 17:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168100#M263984</guid>
      <dc:creator>Dipu</dc:creator>
      <dc:date>2014-02-09T17:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression. ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168101#M263985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you PG. I think that was the most correct solution you told me.&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Dipu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 20:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTE-A-CASE-expression-has-no-ELSE-clause-Cases-not-accounted/m-p/168101#M263985</guid>
      <dc:creator>Dipu</dc:creator>
      <dc:date>2014-02-09T20:14:19Z</dc:date>
    </item>
  </channel>
</rss>

