<?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 by column has NULL values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merge-by-column-has-NULL-values/m-p/65460#M14210</link>
    <description>&amp;amp;job_id is a macro variable that you haven't defined.  To more fully answer your questions, you need to provide a complete example of what you are trying to do and the answers you are looking for.  I did answer your question of how to include all rows of T1, but your response indicates that is not the problem you were trying to solve.</description>
    <pubDate>Thu, 19 Aug 2010 16:11:39 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2010-08-19T16:11:39Z</dc:date>
    <item>
      <title>Merge by column has NULL values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-by-column-has-NULL-values/m-p/65457#M14207</link>
      <description>I have 2 tables &lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 19 Aug 2010 14:12:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-by-column-has-NULL-values/m-p/65457#M14207</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-19T14:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Merge by column has NULL values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-by-column-has-NULL-values/m-p/65458#M14208</link>
      <description>To use a MERGE with a BY statement, the observations are joined on matching values of CD.  Since you have none, the example data would have 8 observations.  Your "if in1 and in2;" statement is what causes the output dataset to have 0 observations.&lt;BR /&gt;
&lt;BR /&gt;
To include all rows of T1, change the IF statement to&lt;BR /&gt;
IF in1;&lt;BR /&gt;
In this example, your output dataset, e1, would be the same as t1.&lt;BR /&gt;
&lt;BR /&gt;
To understand this behavior, get rid of the DROP and subsetting IF, and add a KEEP statement for in1 and in2 and then look at the output.&lt;BR /&gt;
&lt;BR /&gt;
This paper will help&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/technote/ts705.pdf" target="_blank"&gt;http://support.sas.com/techsup/technote/ts705.pdf&lt;/A&gt;&lt;BR /&gt;
(I just searched support.sas.com for "merge examples".)&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Thu, 19 Aug 2010 14:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-by-column-has-NULL-values/m-p/65458#M14208</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-08-19T14:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Merge by column has NULL values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-by-column-has-NULL-values/m-p/65459#M14209</link>
      <description>Sorry I am kind of new to SAS, but isn't this  'If in1 and in2' statement applicable for assigning the job id to batch id? Why should it affect the MErge?</description>
      <pubDate>Thu, 19 Aug 2010 14:45:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-by-column-has-NULL-values/m-p/65459#M14209</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-19T14:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Merge by column has NULL values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-by-column-has-NULL-values/m-p/65460#M14210</link>
      <description>&amp;amp;job_id is a macro variable that you haven't defined.  To more fully answer your questions, you need to provide a complete example of what you are trying to do and the answers you are looking for.  I did answer your question of how to include all rows of T1, but your response indicates that is not the problem you were trying to solve.</description>
      <pubDate>Thu, 19 Aug 2010 16:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-by-column-has-NULL-values/m-p/65460#M14210</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-08-19T16:11:39Z</dc:date>
    </item>
  </channel>
</rss>

