<?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 find the value like “%{%}%”; “%[%]%” and “%(%)%” in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/find-the-value-like-and/m-p/543699#M150311</link>
    <description>&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I find the&amp;nbsp;value like&amp;nbsp;“%{%}%”; “%[%]%” and “%(%)%”&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example&amp;nbsp;&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (A)}"&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (E)}"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (O)}"&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (U)}"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (N)}"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the following codes,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table whichone as 
select distinct 
*
from step9.Patstat_gb_hrm_Step2
where HRM_L2_Step2 like ('%{%}%','%[%]%','%(%)%')
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;however,&amp;nbsp; I get a result&amp;nbsp;like below,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;928  proc sql;
929  create table whichone as
930  select distinct
931  *
932  from step9.Patstat_gb_hrm_Step2
933  where HRM_L2_Step2 like ('%{%}%','%[%]%','%(%)%')
                                     -
                                     22
                                     76
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, ), *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;,
              =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE,
              LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.

ERROR 76-322: Syntax error, statement will be ignored.

934  ;
935  quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;could you please give me some suggestions about this?&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Mar 2019 02:42:04 GMT</pubDate>
    <dc:creator>Alexxxxxxx</dc:creator>
    <dc:date>2019-03-16T02:42:04Z</dc:date>
    <item>
      <title>find the value like “%{%}%”; “%[%]%” and “%(%)%”</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-the-value-like-and/m-p/543699#M150311</link>
      <description>&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I find the&amp;nbsp;value like&amp;nbsp;“%{%}%”; “%[%]%” and “%(%)%”&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example&amp;nbsp;&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (A)}"&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (E)}"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (O)}"&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (U)}"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"{UMLAUT OVER (N)}"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the following codes,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table whichone as 
select distinct 
*
from step9.Patstat_gb_hrm_Step2
where HRM_L2_Step2 like ('%{%}%','%[%]%','%(%)%')
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;however,&amp;nbsp; I get a result&amp;nbsp;like below,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;928  proc sql;
929  create table whichone as
930  select distinct
931  *
932  from step9.Patstat_gb_hrm_Step2
933  where HRM_L2_Step2 like ('%{%}%','%[%]%','%(%)%')
                                     -
                                     22
                                     76
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, ), *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;,
              =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE,
              LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.

ERROR 76-322: Syntax error, statement will be ignored.

934  ;
935  quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;could you please give me some suggestions about this?&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2019 02:42:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-the-value-like-and/m-p/543699#M150311</guid>
      <dc:creator>Alexxxxxxx</dc:creator>
      <dc:date>2019-03-16T02:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: find the value like “%{%}%”; “%[%]%” and “%(%)%”</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-the-value-like-and/m-p/543700#M150312</link>
      <description>&lt;P&gt;I think you need to list multiple LIKE statements with an OR.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LIKE does not have an IN type functionality to list multiple things at once.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;HRM_L2_Step2 like '%{%}%'
or HRM_L2_Step2 like '%[%]%' 
or HRM_L2_Step2 like '%(%)%'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you can try regular expressions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/262815"&gt;@Alexxxxxxx&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can I find the&amp;nbsp;value like&amp;nbsp;“%{%}%”; “%[%]%” and “%(%)%”&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"{UMLAUT OVER (A)}"&lt;/P&gt;
&lt;P&gt;"{UMLAUT OVER (E)}"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"{UMLAUT OVER (O)}"&lt;/P&gt;
&lt;P&gt;"{UMLAUT OVER (U)}"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"{UMLAUT OVER (N)}"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use the following codes,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table whichone as 
select distinct 
*
from step9.Patstat_gb_hrm_Step2
where HRM_L2_Step2 like ('%{%}%','%[%]%','%(%)%')
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;however,&amp;nbsp; I get a result&amp;nbsp;like below,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;928  proc sql;
929  create table whichone as
930  select distinct
931  *
932  from step9.Patstat_gb_hrm_Step2
933  where HRM_L2_Step2 like ('%{%}%','%[%]%','%(%)%')
                                     -
                                     22
                                     76
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, ), *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;,
              =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE,
              LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.

ERROR 76-322: Syntax error, statement will be ignored.

934  ;
935  quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;could you please give me some suggestions about this?&lt;/P&gt;
&lt;P&gt;thanks in advance.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2019 02:49:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-the-value-like-and/m-p/543700#M150312</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-16T02:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: find the value like “%{%}%”; “%[%]%” and “%(%)%”</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-the-value-like-and/m-p/543710#M150315</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as 
select distinct 
*
from have
where prxmatch('/{.*}|\[.*\]|(.*)/', HRM_L2_Step2);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Mar 2019 07:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-the-value-like-and/m-p/543710#M150315</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-16T07:37:33Z</dc:date>
    </item>
  </channel>
</rss>

