<?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: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7) in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745415#M29367</link>
    <description>&lt;P&gt;However, there might be a way around this. in SQL, I would split my WHEN's as follows:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;select ID,&lt;BR /&gt;coalesce( CASE&lt;BR /&gt;when X between 0 and 30 then 1&lt;BR /&gt;when X between 31 and 70 then 2&lt;BR /&gt;when X between 71 and 100 then 3&lt;BR /&gt;when X between 101 and 200 then 4&lt;BR /&gt;when X between 201 and 300 then 5&lt;BR /&gt;when X between 301 and 400 then 6&lt;BR /&gt;when X between 401 and 500 then 7&lt;BR /&gt;when X between 501 and 600 then 8&lt;BR /&gt;when X between 601 and 700 then 9 end,&lt;BR /&gt;CASE&lt;BR /&gt;when X between 701 and 800 then 10&lt;BR /&gt;when X between 801 and 900 then 11&lt;BR /&gt;when X between 901 and 1000 then 12&lt;BR /&gt;when X &amp;gt; 1000 then 13&lt;BR /&gt;end )&lt;BR /&gt;from Y&lt;BR /&gt;&lt;BR /&gt;Is there a way to do the same in data item expressions?&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jun 2021 08:51:04 GMT</pubDate>
    <dc:creator>Eitan123</dc:creator>
    <dc:date>2021-06-03T08:51:04Z</dc:date>
    <item>
      <title>Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745173#M29344</link>
      <description>&lt;P&gt;Hey,&lt;BR /&gt;&lt;BR /&gt;I've been trying to create a data item using the following code (X is an existing data item):&lt;BR /&gt;CASE WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt;= 0 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 30) THEN 1&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 30 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 70) THEN 2&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 70 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 100) THEN 3&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 100 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 200) THEN 4&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 200 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 300) THEN 5&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 300 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 400) THEN 6&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 400 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 500) THEN 7&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 500 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 600) THEN 8&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 600 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 700) THEN 9&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 700 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 800) THEN 10&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 800 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 900) THEN 11&lt;BR /&gt;WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 900 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 1000) THEN 12&lt;BR /&gt;ELSE 13&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;After trying to use my new data item in&amp;nbsp;CIS in a campaign, I got the following error (known in SQL with CASE statements as well):&lt;BR /&gt;&lt;SPAN&gt;ERROR: Open cursor error: ICommand::Execute failed. : Case expressions may only be nested to level 10.: Statement(s) could not be prepared.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there any way around this? preferably within SAS Information Map Studio.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a SQL DB table ready for more complicated data items which Information Maps can not handle, but that would only be a last resort for me.&lt;BR /&gt;&lt;BR /&gt;Just to clarify -&amp;nbsp; I didn't leave any code out, the entire code is added to this topic. I know this code is not nested and that the error is about nested CASE statements, that's the main issue and the reason i opened this topic.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 06:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745173#M29344</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-06-03T06:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745287#M29345</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I got A's in Algebra, so I love it when I get to use &lt;EM&gt;y=mx+b&lt;/EM&gt;!&amp;nbsp; Check my work, because my teachers were push overs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;CASE 
  WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt;= 0 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 30)   THEN 1
  WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 30 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 70)   THEN 2
  WHEN (&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; 70 AND &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;lt;= 1000) 
    THEN ceil(&amp;lt;&amp;lt;root.X&amp;gt;&amp;gt;/100)+2
  ELSE 13
END&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 19:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745287#M29345</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-06-02T19:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745292#M29346</link>
      <description>&lt;P&gt;I don't see how that code is generating that error.&lt;/P&gt;
&lt;P&gt;The error is talking about NESTED case statements such as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case when (...)
  case when (...)
     case when (...) 
      ...
     end
  end
end&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Jun 2021 19:11:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745292#M29346</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-02T19:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745310#M29347</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I don't see how that code is generating that error.&lt;/P&gt;
&lt;P&gt;The error is talking about NESTED case statements such as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case when (...)
  case when (...)
     case when (...) 
      ...
     end
  end
end&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;OP pretty obviously did not show a complete step of anything. So perhaps hiding the multiple nesting levels actually used assuming the content of this single one was the problem since it has more than 10 cases?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 20:08:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745310#M29347</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-02T20:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745399#M29359</link>
      <description>I don't know what OP is, but just to clarify - I know my code does not include nested CASE statements, that's why i'm having trouble reasoning with it. I didn't leave any code out, the entire code is added to this topic.</description>
      <pubDate>Thu, 03 Jun 2021 06:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745399#M29359</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-06-03T06:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745401#M29360</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15329"&gt;@PhilC&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I copy+pasted your code. Doesn't compile.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 07:06:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745401#M29360</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-06-03T07:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745403#M29361</link>
      <description>I searched the web and found another SQL coding help request not SAS, but SQL.  Same case structure, same mention of nesting.  I assume the word nesting must allude to the compile time conversion of the case statement to a nested if-then structure... &lt;BR /&gt;&lt;BR /&gt;(OP original post or original poster)</description>
      <pubDate>Thu, 03 Jun 2021 07:26:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745403#M29361</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-06-03T07:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745404#M29362</link>
      <description>Sorry it didn't work.</description>
      <pubDate>Thu, 03 Jun 2021 07:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745404#M29362</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-06-03T07:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745406#M29363</link>
      <description>&lt;P&gt;Perhaps there's a way to split the amount of WHEN's in Information Maps inside the data item's expression?&lt;BR /&gt;&lt;BR /&gt;in SQL I would use COALESCE to pick the first none-null value that comes up so splitting is possible there, but I don't know any way to do so in SAS:&lt;/P&gt;&lt;PRE class="lang-sql s-code-block hljs"&gt;&lt;CODE&gt;&lt;SPAN class="hljs-keyword"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class="hljs-built_in"&gt;COALESCE&lt;/SPAN&gt;(
&lt;SPAN class="hljs-keyword"&gt;CASE&lt;/SPAN&gt; &lt;SPAN class="hljs-built_in"&gt;SUBSTRING&lt;/SPAN&gt;(p.Name, &lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;, &lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;)
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'a'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'1'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'b'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'2'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'c'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'3'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'d'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'4'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'e'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'5'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'f'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'6'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'g'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'7'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'h'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'8'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'i'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'9'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;ELSE&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;NULL&lt;/SPAN&gt;
&lt;SPAN class="hljs-keyword"&gt;END&lt;/SPAN&gt;,
&lt;SPAN class="hljs-keyword"&gt;CASE&lt;/SPAN&gt; &lt;SPAN class="hljs-built_in"&gt;SUBSTRING&lt;/SPAN&gt;(p.Name, &lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;, &lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;)
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'j'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'10'&lt;/SPAN&gt; 
    &lt;SPAN class="hljs-keyword"&gt;WHEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'k'&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;THEN&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'11'&lt;/SPAN&gt;  
&lt;SPAN class="hljs-keyword"&gt;END&lt;/SPAN&gt;)
&lt;SPAN class="hljs-keyword"&gt;FROM&lt;/SPAN&gt; dbo.AdventureWorks.Sample &lt;SPAN class="hljs-keyword"&gt;AS&lt;/SPAN&gt; p&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 08:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745406#M29363</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-06-03T08:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745411#M29364</link>
      <description>I have no experience with Information Map  Studio, I have used Enterprise Guide, which has a GUI interface to ”write” SQL. The video I pulled down makes me think EG and IMP are similar. Your last 10 cases on the statement are linear in nature, with the combination of the ceiling function. I can't see why my idea won't work. When I get back to my computer in the morning, I'll look To see if I can offer something more.</description>
      <pubDate>Thu, 03 Jun 2021 08:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745411#M29364</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-06-03T08:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745412#M29365</link>
      <description>&lt;P&gt;Your idea didn't work because I tried it on IMS, not EG.&lt;/P&gt;&lt;P&gt;My client asks these data items to be fully created in IMS, so EG is not an option. Thank you for replying several times...!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 08:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745412#M29365</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-06-03T08:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745414#M29366</link>
      <description>I guess that the outer shell created by CIS already contains a lot of CASEs, and yours is the straw that breaks the camel‘s back.&lt;BR /&gt;One of the inherent deficiencies of pointy-clicky tools: you lose control over the final code.</description>
      <pubDate>Thu, 03 Jun 2021 08:45:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745414#M29366</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-03T08:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745415#M29367</link>
      <description>&lt;P&gt;However, there might be a way around this. in SQL, I would split my WHEN's as follows:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;select ID,&lt;BR /&gt;coalesce( CASE&lt;BR /&gt;when X between 0 and 30 then 1&lt;BR /&gt;when X between 31 and 70 then 2&lt;BR /&gt;when X between 71 and 100 then 3&lt;BR /&gt;when X between 101 and 200 then 4&lt;BR /&gt;when X between 201 and 300 then 5&lt;BR /&gt;when X between 301 and 400 then 6&lt;BR /&gt;when X between 401 and 500 then 7&lt;BR /&gt;when X between 501 and 600 then 8&lt;BR /&gt;when X between 601 and 700 then 9 end,&lt;BR /&gt;CASE&lt;BR /&gt;when X between 701 and 800 then 10&lt;BR /&gt;when X between 801 and 900 then 11&lt;BR /&gt;when X between 901 and 1000 then 12&lt;BR /&gt;when X &amp;gt; 1000 then 13&lt;BR /&gt;end )&lt;BR /&gt;from Y&lt;BR /&gt;&lt;BR /&gt;Is there a way to do the same in data item expressions?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 08:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745415#M29367</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-06-03T08:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745451#M29368</link>
      <description>&lt;P&gt;Sorry!, I though you could use functions.&amp;nbsp; How peculiar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you implement subqueries?&amp;nbsp; I'm thinking of this table and this subquery:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;select min(Z) from Z where &amp;lt;&amp;lt;root.X&amp;gt;&amp;gt; &amp;gt; minX&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="128" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD colspan="2" width="127px" height="15px" class="xl64" style="border-right: .5pt solid black; height: 15.0pt; width: 96pt;"&gt;Table: Z&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" class="xl63" style="height: 15.0pt; border-top: none;"&gt;&lt;STRONG&gt;minX&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="57px" height="15px" class="xl63" style="border-top: none; border-left: none;"&gt;&lt;STRONG&gt;Z&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;30&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;70&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;100&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;200&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;300&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;400&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;500&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;600&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;700&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;800&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;900&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="70px" height="15px" align="right" class="xl63" style="height: 15.0pt; border-top: none;"&gt;1000&lt;/TD&gt;
&lt;TD width="57px" height="15px" align="right" class="xl63" style="border-top: none; border-left: none;"&gt;13&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:47:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745451#M29368</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-06-03T12:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Data Item CASE statement limitations in SAS Information Map Studio (version 4.4 M7)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745460#M29369</link>
      <description>&lt;P&gt;I can't use subqueries, but as it seems CEILING doesn't work and&amp;nbsp;COALESCE does work, and solves the problem without a need for tables.&lt;BR /&gt;Thank you for your time, I highly appreciate the effort! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-Item-CASE-statement-limitations-in-SAS-Information-Map/m-p/745460#M29369</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-06-03T13:32:18Z</dc:date>
    </item>
  </channel>
</rss>

