<?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: Join using a partial match in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-using-a-partial-match/m-p/172337#M13163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wonderful, thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Oct 2014 21:19:10 GMT</pubDate>
    <dc:creator>_robindavies</dc:creator>
    <dc:date>2014-10-04T21:19:10Z</dc:date>
    <item>
      <title>Join using a partial match</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-using-a-partial-match/m-p/172335#M13161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am struggling with a particular join that I hope has a solution in SAS.&amp;nbsp; I have 2 tables as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Reference table 1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;CityRef:&lt;/P&gt;&lt;P&gt;NewYork&lt;/P&gt;&lt;P&gt;London&lt;/P&gt;&lt;P&gt;Paris&lt;/P&gt;&lt;P&gt;Brussels&lt;/P&gt;&lt;P&gt;Canberra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Raw extracted table 2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;CityRaw:&lt;/P&gt;&lt;P&gt;osh&lt;STRONG&gt;NewYork&lt;/STRONG&gt;d&lt;/P&gt;&lt;P&gt;whatevr&lt;STRONG&gt;London&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Paris&lt;/STRONG&gt;owjshg&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Brssuls&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like the following right join to be returned:&lt;/P&gt;&lt;P&gt;CityRaw | CityRef&lt;/P&gt;&lt;P&gt;osh&lt;STRONG&gt;NewYork&lt;/STRONG&gt;d | NewYork&lt;/P&gt;&lt;P&gt;whatevr&lt;STRONG&gt;London | London&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Paris&lt;/STRONG&gt;owjshg | Paris&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Brssuls | -&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would like to join these two tables together if the key from table 1 can be found within the key from table 2.&amp;nbsp; I hope this makes sense.&amp;nbsp; Perhaps proc sql is the answer?&amp;nbsp; Any help would be greatly appreciated and would save me writing a complex iterative find macro in VBA!&amp;nbsp; I am using EG 9.3.&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2014 20:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-using-a-partial-match/m-p/172335#M13161</guid>
      <dc:creator>_robindavies</dc:creator>
      <dc:date>2014-10-04T20:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Join using a partial match</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-using-a-partial-match/m-p/172336#M13162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data table1;&lt;BR /&gt;input CityRef $10.;&lt;BR /&gt;datalines;&lt;BR /&gt;NewYork&lt;BR /&gt;London&lt;BR /&gt;Paris&lt;BR /&gt;Brussels&lt;BR /&gt;Canberra&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;data table2;&lt;BR /&gt;input CityRaw $15.;&lt;BR /&gt;datalines;&lt;BR /&gt;oshNewYorkd&lt;BR /&gt;whatevrLondon&lt;BR /&gt;Parisowjshg&lt;BR /&gt;Brssuls&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select catx(" | ",a.cityraw,b.cityref) as city&lt;/P&gt;&lt;P&gt;from table2 a left join table1 b&lt;/P&gt;&lt;P&gt;on strip(upcase(cityraw)) contains strip(upcase(cityref));&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2014 20:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-using-a-partial-match/m-p/172336#M13162</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-10-04T20:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Join using a partial match</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-using-a-partial-match/m-p/172337#M13163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wonderful, thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2014 21:19:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-using-a-partial-match/m-p/172337#M13163</guid>
      <dc:creator>_robindavies</dc:creator>
      <dc:date>2014-10-04T21:19:10Z</dc:date>
    </item>
  </channel>
</rss>

