<?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: use NOT Like in Case when statement in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/use-NOT-Like-in-Case-when-statement/m-p/638471#M21568</link>
    <description>CODE -&lt;BR /&gt;proc sql;&lt;BR /&gt;create table method as&lt;BR /&gt;select distinct (methodofpayment) as consumernumber ,&lt;BR /&gt;case when ((METHODOFPAYMENT) not like "4%") then 'not selected'&lt;BR /&gt;when ((METHODOFPAYMENT) not like "H%") then 'not selected'&lt;BR /&gt;when ((METHODOFPAYMENT) not like "M%") then 'not selected'&lt;BR /&gt;when ((METHODOFPAYMENT) not like "N%") then 'not selected'&lt;BR /&gt;when ((METHODOFPAYMENT) not like "Q%") then 'not selected'&lt;BR /&gt;else 'selection' end as selectionresult&lt;BR /&gt;from TEMP;&lt;BR /&gt;&lt;BR /&gt;THIS IS THE OUTPUT I AM GETTING:&lt;BR /&gt;&lt;BR /&gt;consumernumber selectionresult&lt;BR /&gt;HD not selected&lt;BR /&gt;SX not selected&lt;BR /&gt;91 not selected&lt;BR /&gt;S5 not selected&lt;BR /&gt;W not selected&lt;BR /&gt;5 not selected&lt;BR /&gt;H not selected&lt;BR /&gt;SQ not selected&lt;BR /&gt;ST not selected&lt;BR /&gt;HX not selected&lt;BR /&gt;H2 not selected&lt;BR /&gt;</description>
    <pubDate>Wed, 08 Apr 2020 20:09:30 GMT</pubDate>
    <dc:creator>Divya12</dc:creator>
    <dc:date>2020-04-08T20:09:30Z</dc:date>
    <item>
      <title>use NOT Like in Case when statement</title>
      <link>https://communities.sas.com/t5/New-SAS-User/use-NOT-Like-in-Case-when-statement/m-p/638456#M21563</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me on how to use &lt;STRONG&gt;not like&lt;/STRONG&gt; operator in a &lt;STRONG&gt;case when statement.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;case when ConsumerNumber NOT IN (4* or H* or M* or N* or Q* or R*) then 'Not Selected' Else 'Selected ' end as selectionresult&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 19:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/use-NOT-Like-in-Case-when-statement/m-p/638456#M21563</guid>
      <dc:creator>Divya12</dc:creator>
      <dc:date>2020-04-08T19:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: use NOT Like in Case when statement</title>
      <link>https://communities.sas.com/t5/New-SAS-User/use-NOT-Like-in-Case-when-statement/m-p/638467#M21567</link>
      <description>&lt;P&gt;can you show the LOG you get when running that code? Copy the entire proc step with messages and paste into a code box opened on the forum with the &amp;lt;/&amp;gt; icon.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 20:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/use-NOT-Like-in-Case-when-statement/m-p/638467#M21567</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-04-08T20:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: use NOT Like in Case when statement</title>
      <link>https://communities.sas.com/t5/New-SAS-User/use-NOT-Like-in-Case-when-statement/m-p/638471#M21568</link>
      <description>CODE -&lt;BR /&gt;proc sql;&lt;BR /&gt;create table method as&lt;BR /&gt;select distinct (methodofpayment) as consumernumber ,&lt;BR /&gt;case when ((METHODOFPAYMENT) not like "4%") then 'not selected'&lt;BR /&gt;when ((METHODOFPAYMENT) not like "H%") then 'not selected'&lt;BR /&gt;when ((METHODOFPAYMENT) not like "M%") then 'not selected'&lt;BR /&gt;when ((METHODOFPAYMENT) not like "N%") then 'not selected'&lt;BR /&gt;when ((METHODOFPAYMENT) not like "Q%") then 'not selected'&lt;BR /&gt;else 'selection' end as selectionresult&lt;BR /&gt;from TEMP;&lt;BR /&gt;&lt;BR /&gt;THIS IS THE OUTPUT I AM GETTING:&lt;BR /&gt;&lt;BR /&gt;consumernumber selectionresult&lt;BR /&gt;HD not selected&lt;BR /&gt;SX not selected&lt;BR /&gt;91 not selected&lt;BR /&gt;S5 not selected&lt;BR /&gt;W not selected&lt;BR /&gt;5 not selected&lt;BR /&gt;H not selected&lt;BR /&gt;SQ not selected&lt;BR /&gt;ST not selected&lt;BR /&gt;HX not selected&lt;BR /&gt;H2 not selected&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Apr 2020 20:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/use-NOT-Like-in-Case-when-statement/m-p/638471#M21568</guid>
      <dc:creator>Divya12</dc:creator>
      <dc:date>2020-04-08T20:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: use NOT Like in Case when statement</title>
      <link>https://communities.sas.com/t5/New-SAS-User/use-NOT-Like-in-Case-when-statement/m-p/638472#M21569</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case when first(ConsumerNumber) IN ("4", "H", "M", "N", "Q", "R") then 'Selected' Else 'Not Selected ' end as selectionresult&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Apr 2020 20:10:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/use-NOT-Like-in-Case-when-statement/m-p/638472#M21569</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-04-08T20:10:26Z</dc:date>
    </item>
  </channel>
</rss>

