<?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: Using the LIKE operator for % signs in text in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-the-LIKE-operator-for-signs-in-text/m-p/574660#M162432</link>
    <description>LIKE is only valid in WHERE statements or PROC SQL. For similar functionality look at the =: operator, or FIND/INDEX functions.</description>
    <pubDate>Thu, 18 Jul 2019 16:10:56 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-07-18T16:10:56Z</dc:date>
    <item>
      <title>Using the LIKE operator for % signs in text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-the-LIKE-operator-for-signs-in-text/m-p/574644#M162421</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to group together a promotional index that includes data like "10% off", "20% Off" etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data work.jk_promotions;&lt;BR /&gt;set work.jk_promo_index;&lt;BR /&gt;if outlet_desc like '%10% OFF%' then promo='10% OFF';&lt;BR /&gt;else if outlet_desc like '20% OFF' then promo='20% OFF';&lt;BR /&gt;else if outlet_desc like '25% OFF' then promo='25% OFF';&lt;BR /&gt;else if outlet_desc like '30% OFF' then promo='30% OFF';&lt;BR /&gt;else if outlet_desc like '40% OFF' then promo='40% OFF';&lt;BR /&gt;else if outlet_desc like '50% OFF' then promo='50% OFF';&lt;BR /&gt;else if outlet_desc like 'BANK' then promo='BANK HOLIDAY';&lt;BR /&gt;else if outlet_desc like 'BABY' then promo='BABY &amp;amp; TODDLER';&lt;BR /&gt;else if outlet_desc like 'APPLE' OR outlet_desc like 'MAC' then promo='APPLE';&lt;BR /&gt;else if outlet_desc like 'END OF SEASON'&lt;BR /&gt;OR outlet_desc like 'EOS'&lt;BR /&gt;OR outlet_desc like 'E&amp;amp;S' then promo='END OF SEASON';&lt;BR /&gt;else if outlet_desc like 'MID' then promo='MID SEASON';&lt;BR /&gt;else if outlet_desc like 'BACK TO SCHOOL' then promo='BACK TO SCHOOL';&lt;BR /&gt;else if outlet_desc like 'BIG EVENT' then promo='BIG EVENT';&lt;BR /&gt;else if outlet_desc like 'BLACK FRIDAY' OR outlet_desc like 'BF' then promo='BLACK FRIDAY';&lt;BR /&gt;else if outlet_desc like 'BLACK TAG' then promo='BLACK TAG';&lt;BR /&gt;else if outlet_desc like 'CYBER WEEK' then promo='CYBER WEEK';&lt;BR /&gt;else if outlet_desc like 'CHARACTER' then promo='CHARACTER';&lt;BR /&gt;else if outlet_desc like 'WEEKEND' then promo='WEEKEND';&lt;BR /&gt;else if outlet_desc like 'TOYS' then promo='TOYS';&lt;BR /&gt;else if outlet_desc like 'EASTER' then promo='EASTER';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error that I am getting is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 388-185: Expecting an arithmetic operator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance would be appreciated, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 15:45:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-the-LIKE-operator-for-signs-in-text/m-p/574644#M162421</guid>
      <dc:creator>JihunKim25</dc:creator>
      <dc:date>2019-07-18T15:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using the LIKE operator for % signs in text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-the-LIKE-operator-for-signs-in-text/m-p/574658#M162431</link>
      <description>&lt;P&gt;Is LIKE&amp;nbsp; allowed inside an IF statement &lt;STRONG&gt;within a data step&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;Isn't it for PROC SQL? The Error must be underlined for the LIKE in your log, where it is actually expecting an arithmetic operator and that's I think is the error log about. I might be wrong, ready to be corrected.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 16:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-the-LIKE-operator-for-signs-in-text/m-p/574658#M162431</guid>
      <dc:creator>koyelghosh</dc:creator>
      <dc:date>2019-07-18T16:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using the LIKE operator for % signs in text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-the-LIKE-operator-for-signs-in-text/m-p/574660#M162432</link>
      <description>LIKE is only valid in WHERE statements or PROC SQL. For similar functionality look at the =: operator, or FIND/INDEX functions.</description>
      <pubDate>Thu, 18 Jul 2019 16:10:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-the-LIKE-operator-for-signs-in-text/m-p/574660#M162432</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-18T16:10:56Z</dc:date>
    </item>
  </channel>
</rss>

