<?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 ERROR: Concatenation (||) requires character operands. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Concatenation-requires-character-operands/m-p/408698#M26207</link>
    <description>&lt;P&gt;hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL NOEXEC;
   SELECT (MAX(CASE WHEN(d1= 'C' AND d2= 'X') 
         THEN sutun1||' '||sutun2 ELSE ' ' END)) AS CALCULATION
      FROM BB2.Ott t1;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Concatenation (||) requires character operands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what's my fault?&lt;/P&gt;&lt;P&gt;thaks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2017 14:38:38 GMT</pubDate>
    <dc:creator>KirLiSakaL</dc:creator>
    <dc:date>2017-10-30T14:38:38Z</dc:date>
    <item>
      <title>ERROR: Concatenation (||) requires character operands.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Concatenation-requires-character-operands/m-p/408698#M26207</link>
      <description>&lt;P&gt;hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL NOEXEC;
   SELECT (MAX(CASE WHEN(d1= 'C' AND d2= 'X') 
         THEN sutun1||' '||sutun2 ELSE ' ' END)) AS CALCULATION
      FROM BB2.Ott t1;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Concatenation (||) requires character operands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what's my fault?&lt;/P&gt;&lt;P&gt;thaks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 14:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Concatenation-requires-character-operands/m-p/408698#M26207</guid>
      <dc:creator>KirLiSakaL</dc:creator>
      <dc:date>2017-10-30T14:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Concatenation (||) requires character operands.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Concatenation-requires-character-operands/m-p/408717#M26211</link>
      <description>&lt;P&gt;Exactly what it says, your variables should be character but they're numeric.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use CATX instead, but it converts numbers using the BEST format so verify it gives you what you want.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 14:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Concatenation-requires-character-operands/m-p/408717#M26211</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-30T14:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Concatenation (||) requires character operands.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Concatenation-requires-character-operands/m-p/408732#M26214</link>
      <description>&lt;P&gt;What is it your actually trying to do as there are various issues with your code.&amp;nbsp; First, you have the problem as given by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;, you are concatenating (a string function) numeric variables.&amp;nbsp; Secondly, you are max()ing (a numeric function) on character data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Provide a small bit of test data and show what you want out, maybe something like:&lt;/P&gt;
&lt;PRE&gt;proc sql noexec;
  select  max(coalesce(SUTUN1,SUTUN2)) as CALCULATION
  from    (select * from BB2.OTT where D1="C" and D2="X");
quit;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Oct 2017 15:11:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Concatenation-requires-character-operands/m-p/408732#M26214</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-10-30T15:11:16Z</dc:date>
    </item>
  </channel>
</rss>

