<?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: Merging Issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277442#M55707</link>
    <description>&lt;P&gt;Use operator EQT that tests equality up to the length of the shortest string:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
length t1 $8;
do t1 = "aaba", "acdteg", "uret";
    n + 1;
    output;
    end;
run;

data b;
length t2 $8;
do t2 = "aab", "acd", "uretav";
    m + 10;
    output;
    end;
run;

proc sql;
select a.*, b.*
from a, b
where t1 eqt t2;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Jun 2016 03:56:19 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-06-15T03:56:19Z</dc:date>
    <item>
      <title>Merging Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277437#M55704</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As shown in the figure below, I would like to merge Table 1 and Table 2 using common key IDs: &lt;STRONG&gt;card_nbr&lt;/STRONG&gt; and &lt;STRONG&gt;transaction_name. &lt;/STRONG&gt;However, I found out that the transaction names in table 2 are truncated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="588"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="2" width="248"&gt;Table 1&lt;/TD&gt;
&lt;TD width="72"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD colspan="2" width="268"&gt;Table 2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;card_nbr&lt;/TD&gt;
&lt;TD&gt;transaction_name&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;card_nbr&lt;/TD&gt;
&lt;TD&gt;transaction_name&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;8000&lt;/TD&gt;
&lt;TD&gt;Harvey Norman 12M: 0/12&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;8000&lt;/TD&gt;
&lt;TD&gt;Harvey Norman 12M&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;7000&lt;/TD&gt;
&lt;TD&gt;Ikea 36M: 0/12&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;7000&lt;/TD&gt;
&lt;TD&gt;Ikea 36M&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I truncate the transaction name in Table 1 to match the data in Table 2? I have checked the rest of the data and only these installment transactions would have the symbol "&lt;STRONG&gt;:&lt;/STRONG&gt;" followed by e.g: 0/12, 3/12. etc. I would like to remove anything from the symbol "&lt;STRONG&gt;:&lt;/STRONG&gt;" onwards from Table 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate anyone's kind help to solve this coding issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 03:28:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277437#M55704</guid>
      <dc:creator>rush_milo</dc:creator>
      <dc:date>2016-06-15T03:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277440#M55705</link>
      <description>&lt;P&gt;Use scan statement to extract string before colon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Table1_new;&lt;/P&gt;&lt;P&gt;set Table1;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;transaction_name_new=scan(transaction_name,1,':');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 03:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277440#M55705</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-06-15T03:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277442#M55707</link>
      <description>&lt;P&gt;Use operator EQT that tests equality up to the length of the shortest string:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
length t1 $8;
do t1 = "aaba", "acdteg", "uret";
    n + 1;
    output;
    end;
run;

data b;
length t2 $8;
do t2 = "aab", "acd", "uretav";
    m + 10;
    output;
    end;
run;

proc sql;
select a.*, b.*
from a, b
where t1 eqt t2;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jun 2016 03:56:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277442#M55707</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-15T03:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277443#M55708</link>
      <description>&lt;P&gt;I never knew the option of eqt.&amp;nbsp;This is why Super users makes this community special.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for sharing.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 04:01:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277443#M55708</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-06-15T04:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277448#M55711</link>
      <description>&lt;P&gt;Thank you both R&lt;SPAN&gt;ahulG and PG Stats! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 04:42:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Issue/m-p/277448#M55711</guid>
      <dc:creator>rush_milo</dc:creator>
      <dc:date>2016-06-15T04:42:17Z</dc:date>
    </item>
  </channel>
</rss>

