<?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: Error: Result of when clause 8 is not same data type as the preceding results in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751893#M236769</link>
    <description>&lt;P&gt;Hello, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have been in this forum long enough now to know that when you get an error message, we need you to show us the LOG for this PROC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;INSTRUCTIONS FOR PROVIDING THE LOG&lt;/STRONG&gt;: We need the ENTIRE log for this PROC, 100% of the log for this PROC, with nothing chopped out, every single character. Copy this portion of the log as text. Click on the &amp;lt;/&amp;gt; icon and paste your log as text into the window that appears.&lt;/P&gt;</description>
    <pubDate>Sat, 03 Jul 2021 11:08:40 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-07-03T11:08:40Z</dc:date>
    <item>
      <title>Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751865#M236754</link>
      <description>&lt;P&gt;hello team,&lt;/P&gt;
&lt;P&gt;I have a case statement, that all have character data type after then, but it gives me error message.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;blue blue&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 06:08:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751865#M236754</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-03T06:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751883#M236765</link>
      <description>I baked a cake but it tastes funny.  I did use eggs.  What did I do wrong?</description>
      <pubDate>Sat, 03 Jul 2021 10:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751883#M236765</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-07-03T10:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751893#M236769</link>
      <description>&lt;P&gt;Hello, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have been in this forum long enough now to know that when you get an error message, we need you to show us the LOG for this PROC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;INSTRUCTIONS FOR PROVIDING THE LOG&lt;/STRONG&gt;: We need the ENTIRE log for this PROC, 100% of the log for this PROC, with nothing chopped out, every single character. Copy this portion of the log as text. Click on the &amp;lt;/&amp;gt; icon and paste your log as text into the window that appears.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 11:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751893#M236769</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-03T11:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751900#M236771</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;hello team,&lt;/P&gt;
&lt;P&gt;I have a case statement, that all have character data type after then, but it gives me error message.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;blue blue&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There is either a typo you are not seeing or the variables in the source dataset are not the data type you think they are.&lt;/P&gt;
&lt;P&gt;Please show the code, preferable the log.&amp;nbsp; Also show the definition of the input dataset(s).&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 12:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751900#M236771</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-03T12:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751910#M236777</link>
      <description>&lt;P&gt;This is the code: This gives error and the affected code is where joins are: Thanks, blue blue&lt;/P&gt;
&lt;PRE&gt;Proc sql;
create table table_out as
select distinct c.*,
case
when (not missing(25percentile) and rate *100 &amp;lt; 25percentile) then '&amp;lt;25'
when (not missing(25percentile) and rate *100 &amp;gt;=25percentile and rate &amp;lt;50percentile) then '25'
when (not missing(50percentile) and rate *100 &amp;gt;=50percentile and rate &amp;lt;75percentile) then '50'
when (not missing(75percentile) and rate *100 &amp;gt;=75percentile and rate &amp;lt;80percentile) then '75'
when(not missing (80percentile) and rate *100 &amp;gt;80percentile) then 'done'
else 'error'
end as thisjunk
, from lefttable c left join.....

&lt;/PRE&gt;</description>
      <pubDate>Sat, 03 Jul 2021 14:36:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751910#M236777</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-03T14:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751911#M236778</link>
      <description>&lt;P&gt;Hello team,&lt;/P&gt;
&lt;P&gt;It is not doable for me to give you the entire log, it is my work computer. If it was my personal computer, I would have copied and send everything out.&lt;/P&gt;
&lt;P&gt;I posted the code.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;blue blue&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 14:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751911#M236778</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-03T14:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751912#M236779</link>
      <description>&lt;P&gt;That code cannot work.&amp;nbsp; &amp;nbsp;You cannot have a variable whose name starts with a digit.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 15:04:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751912#M236779</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-03T15:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751913#M236780</link>
      <description>&lt;P&gt;Check carefully for unbalanced parentheses and unbalanced quotes.&amp;nbsp; Especially if you really have named your variable starting with digits so that you need to use name literals to reference them.&amp;nbsp; That means there are more chances to have messed up the quotes.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 15:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751913#M236780</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-03T15:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751915#M236782</link>
      <description>Where are you referring?</description>
      <pubDate>Sat, 03 Jul 2021 16:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751915#M236782</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-03T16:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751916#M236783</link>
      <description />
      <pubDate>Sat, 03 Jul 2021 16:21:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751916#M236783</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-03T16:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751917#M236784</link>
      <description>Can you please let me know which line? I don’t have variables with digits!&lt;BR /&gt;Thanks &lt;BR /&gt;Blue green</description>
      <pubDate>Sat, 03 Jul 2021 16:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751917#M236784</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-03T16:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751921#M236787</link>
      <description>&lt;P&gt;Here I put digit but in real world it starts with BQ_.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;blue blue&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 17:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751921#M236787</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-03T17:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751922#M236788</link>
      <description>&lt;P&gt;sorry, I noticed it, in real world it starts with letters. It is QB_25, QB_50,..&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;blue greeen&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 17:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751922#M236788</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-03T17:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Result of when clause 8 is not same data type as the preceding results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751925#M236789</link>
      <description>&lt;P&gt;Use a simple process of elimination to discover which WHEN clause is generating the wrong type of value.&lt;/P&gt;
&lt;P&gt;Comment out some of the lines and see if the error is eliminated or not.&amp;nbsp; Depending on the result comment out other sections until you have found the offending section (or sections).&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 18:01:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Result-of-when-clause-8-is-not-same-data-type-as-the/m-p/751925#M236789</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-03T18:01:58Z</dc:date>
    </item>
  </channel>
</rss>

