<?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- proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Like-proc-sql/m-p/803529#M316402</link>
    <description>&lt;P&gt;Just split and concatenate the strings:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want2 as
select *
from have
where IP like '%' !! "&amp;amp;wanted_IP."
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Mar 2022 09:57:51 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-03-23T09:57:51Z</dc:date>
    <item>
      <title>Like- proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-proc-sql/m-p/803527#M316400</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to use like operator in proc sql.&lt;/P&gt;
&lt;P&gt;I want to ask why when I use macro variable then&amp;nbsp;&lt;CODE class=" language-sas"&gt;want2 data&amp;nbsp;set&amp;nbsp;cannot&amp;nbsp;find&amp;nbsp;the&amp;nbsp;row??&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data have;
input IP $ 9.;
cards;
033948777
383888388
027441567
;
Run;


proc sql;
create table want1 as
select *
from have
where IP like '%27441567'
;
quit;


%let wanted_IP=27441567;
proc sql;
create table want2 as
select *
from have
where IP like "%&amp;amp;wanted_IP."
;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2022 09:42:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-proc-sql/m-p/803527#M316400</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-03-23T09:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Like- proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-proc-sql/m-p/803528#M316401</link>
      <description>&lt;P&gt;The % sign is not interpreted as a text percent sign, it is interpreted as a macro symbol. So macro %27441567 is referenced, but doesn't exist. To force the percent sign to be interpreted as a text percent sign&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where IP like "%nrstr(%%)&amp;amp;wanted_IP."&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2022 09:49:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-proc-sql/m-p/803528#M316401</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-23T09:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Like- proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-proc-sql/m-p/803529#M316402</link>
      <description>&lt;P&gt;Just split and concatenate the strings:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want2 as
select *
from have
where IP like '%' !! "&amp;amp;wanted_IP."
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2022 09:57:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-proc-sql/m-p/803529#M316402</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-23T09:57:51Z</dc:date>
    </item>
  </channel>
</rss>

