<?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: Use date filter in Extract - DI Studio in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176678#M3539</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any simpler way to do this without using join?&lt;/P&gt;&lt;P&gt;For parameter passing or directly accessing the table, using the filter below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;In Extract, use the filter:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;SOURCE.DATE&amp;gt; LIBNAME.LOAD_DATE.DATE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Dec 2013 16:42:10 GMT</pubDate>
    <dc:creator>DavidCaliman</dc:creator>
    <dc:date>2013-12-18T16:42:10Z</dc:date>
    <item>
      <title>Use date filter in Extract - DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176675#M3536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need inside an extract in DI Studio, using a date filter, accessing another table.&lt;/P&gt;&lt;P&gt;How do I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOURCE -&amp;gt; EXTRACT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Extract, use the filter:&lt;/P&gt;&lt;P&gt;SOURCE.DATE&amp;gt; LOAD_DATE.DATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_DATE is as SAS table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 16:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176675#M3536</guid>
      <dc:creator>DavidCaliman</dc:creator>
      <dc:date>2013-12-18T16:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use date filter in Extract - DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176676#M3537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Table&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; LOAD_DATE &lt;/SPAN&gt;has only 1 record.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 16:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176676#M3537</guid>
      <dc:creator>DavidCaliman</dc:creator>
      <dc:date>2013-12-18T16:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use date filter in Extract - DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176677#M3538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the SQL Join transformation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 16:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176677#M3538</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-12-18T16:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Use date filter in Extract - DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176678#M3539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any simpler way to do this without using join?&lt;/P&gt;&lt;P&gt;For parameter passing or directly accessing the table, using the filter below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;In Extract, use the filter:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;SOURCE.DATE&amp;gt; LIBNAME.LOAD_DATE.DATE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 16:42:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176678#M3539</guid>
      <dc:creator>DavidCaliman</dc:creator>
      <dc:date>2013-12-18T16:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use date filter in Extract - DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176679#M3540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think a join is simple, I don't think there is a simpler way if you want to stick with standard transformations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 08:16:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176679#M3540</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-12-19T08:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Use date filter in Extract - DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176680#M3541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;an alternative to a join, would be to use a macro variable. I use the pre-code in the transform to set the macro&amp;nbsp; variable something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SQL NOPRINT;&lt;/P&gt;&lt;P&gt;SELECT A.DATE into :LOAD_DATE FROM TABLE;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then reference the macro variable in your FIlter transform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOURCE_DATE &amp;gt; &amp;amp;LOAD_DATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if source_date is a "date" data type you'll want to cast your macro variable to a date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give that a try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 19:17:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176680#M3541</guid>
      <dc:creator>Michael_SAS</dc:creator>
      <dc:date>2013-12-19T19:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Use date filter in Extract - DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176681#M3542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If using &lt;A _jive_internal="true" href="https://communities.sas.com/mailto:Michael@SAS/"&gt;Michael@SAS&lt;/A&gt; approach and your SOURCE table is in a data base and not SAS then make sure that you pass the macro variable in a form which enables the SAS Access engine to detect that this is a date value and needs conversion into the DB equivalent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way how this would work is to populate the macro variable with a string like 31DEC2013 which you then use in your SQL where clause like:&lt;/P&gt;&lt;P&gt;.... where source.date="&amp;amp;load_date"d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SQL NOPRINT;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SELECT put(max(DATE),date9.) into :LOAD_DATE FROM control_table;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 20:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Use-date-filter-in-Extract-DI-Studio/m-p/176681#M3542</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-12-19T20:09:40Z</dc:date>
    </item>
  </channel>
</rss>

