<?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: left join on a partial string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/left-join-on-a-partial-string/m-p/325754#M271457</link>
    <description>&lt;P&gt;Really should provide some idea of the structure/contents of both tables and what the desired output may be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is something like this what your are looking for:&lt;/P&gt;
&lt;PRE&gt;data table1;
   input word $;
datalines;
lamb
Lamb
sheep
cow
;
run;

data table2;
   key=  "Mary,had,a,Little,Lamb";output;
   key=  "Sheep are not cows";output;
run;

proc sql;
   select table1.*, table2.*
   from table1, table2
   where index(table2.key,strip(table1.word))&amp;gt;0;
quit;&lt;/PRE&gt;</description>
    <pubDate>Wed, 18 Jan 2017 18:15:34 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-01-18T18:15:34Z</dc:date>
    <item>
      <title>left join on a partial string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/left-join-on-a-partial-string/m-p/325748#M271456</link>
      <description>&lt;P&gt;I have table1 and table2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Trying to do a left join from Table1 to Table2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In table1 the key is Lamb&lt;/P&gt;
&lt;P&gt;in table2 the key is Mary,had,a,Little,Lamb in one column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to join these tables on a key where table1 key matches the partial string in Table2. I want to bring back te results if Lamb is anywhere in the key.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;paul&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 17:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/left-join-on-a-partial-string/m-p/325748#M271456</guid>
      <dc:creator>paul2877</dc:creator>
      <dc:date>2017-01-18T17:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: left join on a partial string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/left-join-on-a-partial-string/m-p/325754#M271457</link>
      <description>&lt;P&gt;Really should provide some idea of the structure/contents of both tables and what the desired output may be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is something like this what your are looking for:&lt;/P&gt;
&lt;PRE&gt;data table1;
   input word $;
datalines;
lamb
Lamb
sheep
cow
;
run;

data table2;
   key=  "Mary,had,a,Little,Lamb";output;
   key=  "Sheep are not cows";output;
run;

proc sql;
   select table1.*, table2.*
   from table1, table2
   where index(table2.key,strip(table1.word))&amp;gt;0;
quit;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Jan 2017 18:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/left-join-on-a-partial-string/m-p/325754#M271457</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-01-18T18:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: left join on a partial string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/left-join-on-a-partial-string/m-p/325768#M271458</link>
      <description>&lt;P&gt;Details will be important.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does capitalization matter?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Partial words:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this contain Lamb:&amp;nbsp; Lambaste,the,cowards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this contain sheep:&amp;nbsp; shy,sheepish,timid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this contain sheep:&amp;nbsp; wolf-in-sheep's-clothing&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 19:01:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/left-join-on-a-partial-string/m-p/325768#M271458</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-01-18T19:01:26Z</dc:date>
    </item>
  </channel>
</rss>

