<?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 when condition contains missing value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-when-condition-contains-missing-value/m-p/167457#M300847</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You make my day!&lt;/P&gt;&lt;P&gt;Thanks, Tom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Feb 2014 04:43:20 GMT</pubDate>
    <dc:creator>JMD</dc:creator>
    <dc:date>2014-02-08T04:43:20Z</dc:date>
    <item>
      <title>Proc SQL when condition contains missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-when-condition-contains-missing-value/m-p/167455#M300845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good evening,&lt;/P&gt;&lt;P&gt;I try to merge 2 file using sql. The condition file contains missing value since I put all condition in one file. For those with missing, SQL pick up no record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the code below, if wish that time=2 should pick up the second record in "source" data as two=6 and three=8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion of how to correct the SQL or of other method is very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JHN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data condition;&lt;BR /&gt;input time one two three ;&lt;BR /&gt;datalines;&lt;BR /&gt;1 3 4 5&lt;BR /&gt;2 . 6 8&lt;BR /&gt;3 2 . .&lt;BR /&gt;4 9 6 .&lt;BR /&gt;;;;;&lt;/P&gt;&lt;P&gt;data source;&lt;BR /&gt;input number_client one two three ;&lt;BR /&gt;datalines;&lt;BR /&gt;7 3 4 5&lt;BR /&gt;8 3 6 8&lt;BR /&gt;9 2 5 6&lt;BR /&gt;10 2 6 9&lt;BR /&gt;11 3 6 8&lt;BR /&gt;12 3 6 9&lt;BR /&gt;;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table want&lt;BR /&gt;as select * from condition as a left join source as b&lt;BR /&gt;on a.one=b.one and a.two=b.two and a.three=b.three; quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Feb 2014 04:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-when-condition-contains-missing-value/m-p/167455#M300845</guid>
      <dc:creator>JMD</dc:creator>
      <dc:date>2014-02-08T04:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL when condition contains missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-when-condition-contains-missing-value/m-p/167456#M300846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this and see if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on (a.one = b.one or a.one is null)&lt;/P&gt;&lt;P&gt;and (a.two = b.two or a.two is null)&lt;/P&gt;&lt;P&gt;and (a.three = b.three or a.three is null)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Feb 2014 04:40:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-when-condition-contains-missing-value/m-p/167456#M300846</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-02-08T04:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL when condition contains missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-when-condition-contains-missing-value/m-p/167457#M300847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You make my day!&lt;/P&gt;&lt;P&gt;Thanks, Tom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Feb 2014 04:43:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-when-condition-contains-missing-value/m-p/167457#M300847</guid>
      <dc:creator>JMD</dc:creator>
      <dc:date>2014-02-08T04:43:20Z</dc:date>
    </item>
  </channel>
</rss>

