<?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: Max Date in Extract Transformation in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/401415#M12201</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Daylon, can you share how you did this. I need to accomplish the same task in a New job we are creating and this is throwing me for a loop.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2017 15:58:56 GMT</pubDate>
    <dc:creator>smilbuta</dc:creator>
    <dc:date>2017-10-05T15:58:56Z</dc:date>
    <item>
      <title>Max Date in Extract Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254654#M6898</link>
      <description>&lt;P&gt;In DI Studio, I'm working in an Extract Transformation and trying to insert a WHERE clause that will load only the most recent date into the Target table. &amp;nbsp;The Numeric field is called "DWDATE", and the format is "yyyymmdd". &amp;nbsp;I currently use the same logic for a table in SQL Management Studio, and the statement is: &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM From.Dmi_Cif_Daily&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;WHERE DWDATE=(SELECT MAX(DWDATE)FROM DMI_CIF_Daily)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to replicate this in the Extract Transformation in a job in DI Studio. &amp;nbsp;Please help!&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2016 00:12:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254654#M6898</guid>
      <dc:creator>Daylon_Hunt</dc:creator>
      <dc:date>2016-03-05T00:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date in Extract Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254665#M6899</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;
&lt;P&gt;where&lt;/P&gt;
&lt;P&gt;dwdate=max(dwdate)&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2016 01:38:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254665#M6899</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-05T01:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date in Extract Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254669#M6900</link>
      <description>&lt;P&gt;I don't use DI Studio but it must be able to do an inner join like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select A.*
FROM Dmi_Cif_Daily as A
inner join
(SELECT MAX(DWDATE) as dwdate_max 
 FROM DMI_CIF_Daily
) as B
on A.DWDATE=B.dwdate_max &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Mar 2016 02:46:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254669#M6900</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-03-05T02:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date in Extract Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254692#M6901</link>
      <description>First, if you wish to filter out records based on an aggregate function applied on the same table, use a having clause. &lt;BR /&gt;Second, &amp;lt;having&amp;gt; is not supported by the extract transformation, so you need to use the Join transformation instead.</description>
      <pubDate>Sat, 05 Mar 2016 07:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254692#M6901</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-03-05T07:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date in Extract Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254693#M6902</link>
      <description>Addition : if you still like the sub query better, that is also supported in the Join transformation, perhaps not as intuitively as one could wish for, but it's there.</description>
      <pubDate>Sat, 05 Mar 2016 07:22:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254693#M6902</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-03-05T07:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date in Extract Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254996#M6906</link>
      <description>&lt;P&gt;I'm a little confused as to how and why I would incorporate the Join Transformation if I'm not joining together multiple tables. &amp;nbsp;I'm going from an Extract transformation to a Loader. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 16:40:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/254996#M6906</guid>
      <dc:creator>Daylon_Hunt</dc:creator>
      <dc:date>2016-03-07T16:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date in Extract Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/255003#M6907</link>
      <description>DI Studio is a great tool, but not perfect. I think that the Join transformation was named to distinguish it from the extract. But in fact, it's a query builder. Joining is not required in the Join transformation. &lt;BR /&gt;Again, if you wish to use metadata, and have need for Having or sub query, Join is the transformation that does the job.</description>
      <pubDate>Mon, 07 Mar 2016 16:50:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/255003#M6907</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-03-07T16:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date in Extract Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/255860#M6963</link>
      <description>&lt;P&gt;This definitely took some time for me to engineer my first time through, but in the end I was able to build the Having function into the Join transformation. &amp;nbsp;Thank you LinusH!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 17:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/255860#M6963</guid>
      <dc:creator>Daylon_Hunt</dc:creator>
      <dc:date>2016-03-10T17:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date in Extract Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/401415#M12201</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Daylon, can you share how you did this. I need to accomplish the same task in a New job we are creating and this is throwing me for a loop.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 15:58:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Max-Date-in-Extract-Transformation/m-p/401415#M12201</guid>
      <dc:creator>smilbuta</dc:creator>
      <dc:date>2017-10-05T15:58:56Z</dc:date>
    </item>
  </channel>
</rss>

