<?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 COLUMN in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-COLUMN/m-p/400612#M25749</link>
    <description>&lt;P&gt;Also you likely do not want to use CATS as the last "word" of address1 will run into the first "word" of address2 creating a string that is less likely to be "like" your target. Please see this example and a suggested alternate:&lt;/P&gt;
&lt;PRE&gt;data example;
   length address1 - address3 $ 25;
   address1 = 'Apartment 456  ';
   address2 = '123 Main St    ';
   address3 = 'SomeTown       ';
   resultcats = cats(address1,address2,address3);
   resultcatx = catx(' ',address1,address2,address3);
   put resultcats= resultcatx=;
run;&lt;/PRE&gt;
&lt;P&gt;And really, provide the entire code as LIKE is only valid in Proc Sql/fedsql and so may have other issues, plus at least one example of values that this doesn't work for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may also want to construct a variable with the contents of &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;"%" || t2.address_line_3_clean || "%"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;to see exactly what you are comparing too as there is a good chance when using the || operator that your comparison string has a number of trailing spaces. From the documentation:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="xis-noteGenText"&gt;Note: &lt;/SPAN&gt;When you are using the % character, be aware of the effect of trailing blanks. You might have to use the TRIM function to remove trailing blanks in order to match values.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2017 15:08:10 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-10-03T15:08:10Z</dc:date>
    <item>
      <title>LIKE COLUMN</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-COLUMN/m-p/400543#M25739</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing an address matching exercise where I want to match on part of an address being within another address. Is below correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to find&amp;nbsp;t2.address_line_3_clean within the concatenation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;cats(t1.address1, t1.address2, t1.address3) LIKE "%" || t2.address_line_3_clean || "%"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Finbar&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 10:10:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-COLUMN/m-p/400543#M25739</guid>
      <dc:creator>fgillen1</dc:creator>
      <dc:date>2017-10-03T10:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: LIKE COLUMN</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-COLUMN/m-p/400545#M25740</link>
      <description>&lt;P&gt;What happened when you tried it?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 10:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-COLUMN/m-p/400545#M25740</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-03T10:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: LIKE COLUMN</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-COLUMN/m-p/400555#M25741</link>
      <description>Use Perl Regular Expression. See doc for details.</description>
      <pubDate>Tue, 03 Oct 2017 11:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-COLUMN/m-p/400555#M25741</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2017-10-03T11:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: LIKE COLUMN</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-COLUMN/m-p/400612#M25749</link>
      <description>&lt;P&gt;Also you likely do not want to use CATS as the last "word" of address1 will run into the first "word" of address2 creating a string that is less likely to be "like" your target. Please see this example and a suggested alternate:&lt;/P&gt;
&lt;PRE&gt;data example;
   length address1 - address3 $ 25;
   address1 = 'Apartment 456  ';
   address2 = '123 Main St    ';
   address3 = 'SomeTown       ';
   resultcats = cats(address1,address2,address3);
   resultcatx = catx(' ',address1,address2,address3);
   put resultcats= resultcatx=;
run;&lt;/PRE&gt;
&lt;P&gt;And really, provide the entire code as LIKE is only valid in Proc Sql/fedsql and so may have other issues, plus at least one example of values that this doesn't work for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may also want to construct a variable with the contents of &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;"%" || t2.address_line_3_clean || "%"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;to see exactly what you are comparing too as there is a good chance when using the || operator that your comparison string has a number of trailing spaces. From the documentation:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="xis-noteGenText"&gt;Note: &lt;/SPAN&gt;When you are using the % character, be aware of the effect of trailing blanks. You might have to use the TRIM function to remove trailing blanks in order to match values.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 15:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-COLUMN/m-p/400612#M25749</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-03T15:08:10Z</dc:date>
    </item>
  </channel>
</rss>

