<?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: case when coalesce with max function? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/case-when-coalesce-with-max-function/m-p/370247#M275682</link>
    <description>&lt;P&gt;Hi ChrisNZ, unable to open the link, able to send again. thanks&lt;/P&gt;</description>
    <pubDate>Sat, 24 Jun 2017 10:29:41 GMT</pubDate>
    <dc:creator>teddyee</dc:creator>
    <dc:date>2017-06-24T10:29:41Z</dc:date>
    <item>
      <title>case when coalesce with max function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-coalesce-with-max-function/m-p/370236#M275680</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1&lt;BR /&gt;CustID, date contact, filter&lt;BR /&gt;101, 1-Jan-17, Y&lt;BR /&gt;102, 2-Jan-17, N&lt;BR /&gt;103, 3-Jan-17, A&lt;BR /&gt;104, 4-Jan-17, A&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Table 2&lt;BR /&gt;CustID, date contact, filter&lt;BR /&gt;101, 2-Jan-17, N&lt;BR /&gt;102, 2-Jan-17, Y&lt;BR /&gt;103,&amp;nbsp;&lt;BR /&gt;104, 4-Jan-17, N&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Result&lt;BR /&gt;CustID ,date contact ,filter&lt;BR /&gt;101, 2-Jan-17, Y&lt;BR /&gt;102, 2-Jan-17, Y&lt;BR /&gt;103, 3-Jan-17, A&lt;BR /&gt;104, 4-Jan-17, N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CASE &lt;BR /&gt; WHEN coalesce (1.date_contact,2.date_contact) is not null then max (1.date_contact,2.date_contact)&lt;BR /&gt; END AS date_contact FORMAT DATE9.&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;CASE &lt;BR /&gt; WHEN coalesce (1.filter,2.filter) is not null then max (1.filter,2.filter)&lt;BR /&gt; END AS filter&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: i can get the latest date for date_contact when comparing table 1 and 2 but why not for filter??&lt;/P&gt;&lt;P&gt;my result for filter is y&amp;gt;n&amp;gt;a&amp;gt;null&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 08:32:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-coalesce-with-max-function/m-p/370236#M275680</guid>
      <dc:creator>teddyee</dc:creator>
      <dc:date>2017-06-24T08:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: case when coalesce with max function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-coalesce-with-max-function/m-p/370239#M275681</link>
      <description>&lt;P&gt;1-Why the duplication? See &lt;A href="https://communities.sas.com/t5/forums/editpage/board-id/general_program/message-id/47215" target="_blank"&gt;https://communities.sas.com/t5/forums/editpage/board-id/general_program/message-id/47215&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;2-No need for coalesce() as SAS will ignore missing values (there are no null values in SAS)&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 09:41:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-coalesce-with-max-function/m-p/370239#M275681</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-06-24T09:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: case when coalesce with max function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-coalesce-with-max-function/m-p/370247#M275682</link>
      <description>&lt;P&gt;Hi ChrisNZ, unable to open the link, able to send again. thanks&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 10:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-coalesce-with-max-function/m-p/370247#M275682</guid>
      <dc:creator>teddyee</dc:creator>
      <dc:date>2017-06-24T10:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: case when coalesce with max function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-coalesce-with-max-function/m-p/370248#M275683</link>
      <description>&lt;P&gt;that's the link to your other, similar, question&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/case-when-coalesce-with-max-function/m-p/370247" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/case-when-coalesce-with-max-function/m-p/370247&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 10:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-coalesce-with-max-function/m-p/370248#M275683</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-06-24T10:38:10Z</dc:date>
    </item>
  </channel>
</rss>

