<?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: like '[2-9]' not working in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/like-2-9-not-working/m-p/482842#M5987</link>
    <description>&lt;P&gt;You might show a few explicit values of&amp;nbsp; the variable MAKe, indicate if the variable is character or numeric, and show which ones of your examples you want to treat as 'in range' (and include some examples that are not in range)&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jul 2018 14:48:53 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-07-31T14:48:53Z</dc:date>
    <item>
      <title>like '[2-9]' not working</title>
      <link>https://communities.sas.com/t5/SAS-Studio/like-2-9-not-working/m-p/482709#M5984</link>
      <description>&lt;P&gt;I am trying to find any row that contains a number from 2-9 in it in proc sql. I have tried multiple solutions and have researched other peoples questions on this topic and nothing seems to produce a result for me. Here is what I have tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;select *&lt;BR /&gt;from one&lt;BR /&gt;where Make like '%[2-9]%';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;select *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from one&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where Make like '[2-9]';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;BR /&gt;select *&lt;BR /&gt;from one&lt;BR /&gt;where Make like '.[2-9].';&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;BR /&gt;select *&lt;BR /&gt;from one&lt;BR /&gt;where Make contains '[2-9]';&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;BR /&gt;select *&lt;BR /&gt;from one&lt;BR /&gt;where Make like '.*[2-9]*.';&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;None of these seem to produce any results for me. Thank you in advance for any help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 06:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/like-2-9-not-working/m-p/482709#M5984</guid>
      <dc:creator>alilacey0</dc:creator>
      <dc:date>2018-07-31T06:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: like '[2-9]' not working</title>
      <link>https://communities.sas.com/t5/SAS-Studio/like-2-9-not-working/m-p/482721#M5985</link>
      <description>&lt;P&gt;Show test data, in the form of a datastep.&amp;nbsp; As such I can only guess, but maybe think about it differently or:&lt;/P&gt;
&lt;PRE&gt;where 2 &amp;lt;= make &amp;lt;= 9;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 08:02:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/like-2-9-not-working/m-p/482721#M5985</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-07-31T08:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: like '[2-9]' not working</title>
      <link>https://communities.sas.com/t5/SAS-Studio/like-2-9-not-working/m-p/482738#M5986</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where findc(make,'23456789');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This WHERE condition is met if the value of (character) variable MAKE contains at least one of the digits 2, 3, ..., 9.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(And don't forget that PROC SQL steps end with a QUIT statement,&amp;nbsp;not RUN.)&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 09:25:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/like-2-9-not-working/m-p/482738#M5986</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-07-31T09:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: like '[2-9]' not working</title>
      <link>https://communities.sas.com/t5/SAS-Studio/like-2-9-not-working/m-p/482842#M5987</link>
      <description>&lt;P&gt;You might show a few explicit values of&amp;nbsp; the variable MAKe, indicate if the variable is character or numeric, and show which ones of your examples you want to treat as 'in range' (and include some examples that are not in range)&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 14:48:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/like-2-9-not-working/m-p/482842#M5987</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-31T14:48:53Z</dc:date>
    </item>
  </channel>
</rss>

