<?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 Function between 2 tables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767853#M243480</link>
    <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select * from NAMES, ARTICLES where ARTICLE contains NAME;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note this will evaluate 10k*20k = 200m rows. It might run slowly on a small server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Sep 2021 08:50:41 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-09-15T08:50:41Z</dc:date>
    <item>
      <title>Like Function between 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767831#M243470</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to match 2 tables and generate exceptions.&lt;/P&gt;&lt;P&gt;For example :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table1.Name : DAVID,RYAN,JOHN,..... (20k unique names)&lt;/P&gt;&lt;P&gt;Table2.Article :&amp;nbsp;THE VISA WAIVER PROGRAM VWP ALLOWS CITIZENS,... (10k of article crawled from google)&lt;/P&gt;&lt;P&gt;I want to generate exceptions where Article like '%NAME%' which is the 20k of unique names from table1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate someone can assist on it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 05:37:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767831#M243470</guid>
      <dc:creator>RyanWong0510</dc:creator>
      <dc:date>2021-09-15T05:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Like Function between 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767846#M243477</link>
      <description>&lt;P&gt;Please provide some sample data. Makes it much easier to provide a usable code answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 06:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767846#M243477</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-09-15T06:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Like Function between 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767853#M243480</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select * from NAMES, ARTICLES where ARTICLE contains NAME;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note this will evaluate 10k*20k = 200m rows. It might run slowly on a small server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 08:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767853#M243480</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-09-15T08:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Like Function between 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767863#M243488</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Thanks for the support.&lt;/P&gt;&lt;P&gt;Please find the sample data as below :&lt;BR /&gt;DATA Name;&lt;BR /&gt;INPUT id $ Name $ ;&lt;BR /&gt;DATALINES;&lt;BR /&gt;a1 Ryan&lt;BR /&gt;a2 Jack&lt;BR /&gt;a3 Larry&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;Data Article;&lt;BR /&gt;length id article $5000;&lt;BR /&gt;infile cards dsd dlm='|' truncover ;&lt;BR /&gt;Input id Article $5000. ;&lt;BR /&gt;cards;&lt;BR /&gt;1|"California, I'm not sure you know it, but if you didn't know it you should," the president said Monday evening in Long Beach."&lt;BR /&gt;2|Malaysia, I'm not sure Ryan know it, but if you didn't know it you should," Jack said Monday evening in Long Beach. "The eyes of the nation, this is not hyperbole'&lt;BR /&gt;3|The front-running Republican who would likely replace Newsom if he's recalled is Larry Elder, a conservative talk show host and vocal supporter of the former president, as well as a proponent of the so-called "big lie'&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;My expected result will be&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Article&lt;/TD&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;|Malaysia, I'm not sure Ryan know it, but if you didn't know it you should," Jack said Monday evening in Long Beach. "The eyes of the nation, this is not hyperbole'&lt;/TD&gt;&lt;TD&gt;Ryan&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;|Malaysia, I'm not sure Ryan know it, but if you didn't know it you should," Jack said Monday evening in Long Beach. "The eyes of the nation, this is not hyperbole'&lt;/TD&gt;&lt;TD&gt;Jack&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;The front-running Republican who would likely replace Newsom if he's recalled is Larry Elder, a conservative talk show host and vocal supporter of the former&lt;/TD&gt;&lt;TD&gt;Larry&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 10:51:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767863#M243488</guid>
      <dc:creator>RyanWong0510</dc:creator>
      <dc:date>2021-09-15T10:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Like Function between 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767866#M243491</link>
      <description>Thanks Chris,&lt;BR /&gt;By referring to the sample data I provided, it does not turn out any output.&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Sep 2021 10:54:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767866#M243491</guid>
      <dc:creator>RyanWong0510</dc:creator>
      <dc:date>2021-09-15T10:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Like Function between 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767937#M243520</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/398101"&gt;@RyanWong0510&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks Chris,&lt;BR /&gt;By referring to the sample data I provided, it does not turn out any output.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;No output? Post any log in a code box. Copy from the log the entire procedure code and any messages, open a text box on the forum using the &amp;lt;/&amp;gt; icon above the message window and paste the copied text.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Likely need to remove trailing blanks in the Name variable:&lt;/P&gt;
&lt;PRE&gt;proc sql;
   select * from NAME, ARTICLE 
   where ARTICLE contains strip(name)
   ;
quit;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Sep 2021 16:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-Function-between-2-tables/m-p/767937#M243520</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-15T16:54:14Z</dc:date>
    </item>
  </channel>
</rss>

