<?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: PROC SQL - Joining tables w/ partially matching data. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36555#M9201</link>
    <description>Another better choice is to use spedis( ) function.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
    <pubDate>Thu, 24 Mar 2011 03:38:12 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2011-03-24T03:38:12Z</dc:date>
    <item>
      <title>PROC SQL - Joining tables w/ partially matching data.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36551#M9197</link>
      <description>Hello,&lt;BR /&gt;
Need some help with PROC SQL - Joining tables w/ partially matching data.&lt;BR /&gt;
Basically I have two tables which I wanted to join/merge into a new table.&lt;BR /&gt;
However the data are of partial match i.e. AMATA and AMAT or PTTEP and PTTE&lt;BR /&gt;
While some matches 100% like STEC and STEC&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Table_1&lt;BR /&gt;
AMATA&lt;BR /&gt;
STEC&lt;BR /&gt;
PTTEP&lt;BR /&gt;
&lt;BR /&gt;
Table_2&lt;BR /&gt;
AMAT&lt;BR /&gt;
STEC&lt;BR /&gt;
PTTE&lt;BR /&gt;
IVL&lt;BR /&gt;
&lt;BR /&gt;
I want to join Table_1 &amp;amp; Table_2 into Table_3.&lt;BR /&gt;
However, the data only partially matches.&lt;BR /&gt;
&lt;BR /&gt;
Is it possible to Join using "LIKE"&lt;BR /&gt;
or use wildcards like % when specifying the join criteria?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Shivek</description>
      <pubDate>Wed, 23 Mar 2011 14:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36551#M9197</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-23T14:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL - Joining tables w/ partially matching data.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36552#M9198</link>
      <description>Hello Shivek,&lt;BR /&gt;
&lt;BR /&gt;
Try to use =* (sounds like) or eqt (equal to truncated strings). Both can be used with character operands only.&lt;BR /&gt;
&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Wed, 23 Mar 2011 15:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36552#M9198</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-03-23T15:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL - Joining tables w/ partially matching data.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36553#M9199</link>
      <description>Hello.&lt;BR /&gt;
The code below is one of possible ways.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
DATA Table_1;&lt;BR /&gt;
infile cards;&lt;BR /&gt;
input t1 $10.;&lt;BR /&gt;
cards;&lt;BR /&gt;
AMATA&lt;BR /&gt;
STEC&lt;BR /&gt;
PTTEP&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
data Table_2;&lt;BR /&gt;
infile cards;&lt;BR /&gt;
input t2 $10. ;&lt;BR /&gt;
match=1;&lt;BR /&gt;
cards;&lt;BR /&gt;
AMAT &lt;BR /&gt;
STEC &lt;BR /&gt;
PTTE &lt;BR /&gt;
IVL  &lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
proc sql noprint;&lt;BR /&gt;
create table t3 as select table_1.t1, table_2.t2, table_2.match&lt;BR /&gt;
from table_1 left join table_2 on upcase(table_1.t1) contains upcase(trim(table_2.t2));&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 23 Mar 2011 15:09:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36553#M9199</guid>
      <dc:creator>Oleg_L</dc:creator>
      <dc:date>2011-03-23T15:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL - Joining tables w/ partially matching data.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36554#M9200</link>
      <description>Thanks.&lt;BR /&gt;
Will try it out.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for all the help!&lt;BR /&gt;
Shivek

Message was edited by: Shivek</description>
      <pubDate>Wed, 23 Mar 2011 15:22:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36554#M9200</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-23T15:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL - Joining tables w/ partially matching data.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36555#M9201</link>
      <description>Another better choice is to use spedis( ) function.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Thu, 24 Mar 2011 03:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Joining-tables-w-partially-matching-data/m-p/36555#M9201</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-24T03:38:12Z</dc:date>
    </item>
  </channel>
</rss>

