<?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: merge 2 data sets by char vars in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/merge-2-data-sets-by-char-vars/m-p/962060#M375027</link>
    <description>&lt;P&gt;Explain in detail what you mean by "don't succeed". Does it throw an ERROR/WARNING or is the result not what you expect?&lt;/P&gt;
&lt;P&gt;Anyway, provide examples of the data where this happens.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2025 10:07:40 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2025-03-18T10:07:40Z</dc:date>
    <item>
      <title>merge 2 data sets by char vars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-2-data-sets-by-char-vars/m-p/962053#M375024</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to merge 2 data sets by char vars.&lt;/P&gt;
&lt;P&gt;This example is working well but in real world when I do it I don't succeed. merge the 2 tables well&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The field I want to add has null values (in real world)&lt;/P&gt;
&lt;P&gt;Why???&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

  data abc1;
 infile datalines dlm=',';
length x1 $11 x2 $6 ;
 input x1 $ x2 $ ;
 cards;
 AGE_1_VALUE,YESHUT
 ;
 Run;

 data abc2;
 infile datalines dlm=',';
length x1 $11 x2 $6 x3 $10.;
 input x1 $ x2 $ x3 $ ;
 cards;
 AGE_1_VALUE,YESHUT,continuous
 ;
 Run;

proc sql;
create table want as
select a.*,b.x3
from abc1  as a
left join abc2 as b
on compress(upcase(a.x1))=compress(upcase(b.x1)) and compress(upcase(a.x2))=compress(upcase(b.x2))
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 08:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-2-data-sets-by-char-vars/m-p/962053#M375024</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2025-03-18T08:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: merge 2 data sets by char vars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-2-data-sets-by-char-vars/m-p/962060#M375027</link>
      <description>&lt;P&gt;Explain in detail what you mean by "don't succeed". Does it throw an ERROR/WARNING or is the result not what you expect?&lt;/P&gt;
&lt;P&gt;Anyway, provide examples of the data where this happens.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 10:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-2-data-sets-by-char-vars/m-p/962060#M375027</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-03-18T10:07:40Z</dc:date>
    </item>
  </channel>
</rss>

