<?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 Comparing Dates from Netezza vs SAS in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Comparing-Dates-from-Netezza-vs-SAS/m-p/133151#M10818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;BR /&gt;I have read into SAS a Netezza table where one of the columns is a date ( The column type was date ) .&amp;nbsp; &lt;BR /&gt;Now I am trying to create several sub-tables in SAS, but I'm having trouble comparing dates in SAS.&lt;/P&gt;&lt;P&gt;Code to create first SAS dataset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; connect to netezza &lt;BR /&gt;&amp;nbsp;&amp;nbsp; (server=xxxx database=xxxx&amp;nbsp; PORT = xxxx user=xxxx password="&amp;amp;mysaspasswd"&lt;BR /&gt;connection=global);&lt;BR /&gt;create table SASDATA.WEEKLY_REPORT_RT_LOAD as&lt;BR /&gt;select * from connection to netezza&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (select a.* from WEEKLY_REPORT_RT_LOAD a&amp;nbsp; order by 1,2);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code for subtable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let starttime = today() - 30;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table sasdata.rtload_tab_1 as&lt;BR /&gt;select * from SASDATA.WEEKLY_REPORT_RT_LOAD&lt;/P&gt;&lt;P&gt;where marketdate &amp;gt;= &amp;amp;starttime;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the picture of the column (variable) marketdate that i am trying to filter on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="2130" alt="Untitled.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/2130_Untitled.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While the table is created. The data has not been filtered by the date as i would have thought.&lt;/P&gt;&lt;P&gt;As a matter of fact it is not being filtered at all.&lt;BR /&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2012 12:46:46 GMT</pubDate>
    <dc:creator>twelch</dc:creator>
    <dc:date>2012-06-06T12:46:46Z</dc:date>
    <item>
      <title>Comparing Dates from Netezza vs SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Comparing-Dates-from-Netezza-vs-SAS/m-p/133151#M10818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;BR /&gt;I have read into SAS a Netezza table where one of the columns is a date ( The column type was date ) .&amp;nbsp; &lt;BR /&gt;Now I am trying to create several sub-tables in SAS, but I'm having trouble comparing dates in SAS.&lt;/P&gt;&lt;P&gt;Code to create first SAS dataset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; connect to netezza &lt;BR /&gt;&amp;nbsp;&amp;nbsp; (server=xxxx database=xxxx&amp;nbsp; PORT = xxxx user=xxxx password="&amp;amp;mysaspasswd"&lt;BR /&gt;connection=global);&lt;BR /&gt;create table SASDATA.WEEKLY_REPORT_RT_LOAD as&lt;BR /&gt;select * from connection to netezza&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (select a.* from WEEKLY_REPORT_RT_LOAD a&amp;nbsp; order by 1,2);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code for subtable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let starttime = today() - 30;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table sasdata.rtload_tab_1 as&lt;BR /&gt;select * from SASDATA.WEEKLY_REPORT_RT_LOAD&lt;/P&gt;&lt;P&gt;where marketdate &amp;gt;= &amp;amp;starttime;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the picture of the column (variable) marketdate that i am trying to filter on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="2130" alt="Untitled.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/2130_Untitled.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While the table is created. The data has not been filtered by the date as i would have thought.&lt;/P&gt;&lt;P&gt;As a matter of fact it is not being filtered at all.&lt;BR /&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 12:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Comparing-Dates-from-Netezza-vs-SAS/m-p/133151#M10818</guid>
      <dc:creator>twelch</dc:creator>
      <dc:date>2012-06-06T12:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Dates from Netezza vs SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Comparing-Dates-from-Netezza-vs-SAS/m-p/133152#M10819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the displayed values of MARKETDATE it is a DATETIME variable and the STARTTIME you created is a DATE variable.&lt;/P&gt;&lt;P&gt;I would try modifying the sql to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where datepart(marketdate) ge &amp;amp;starttime;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 16:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Comparing-Dates-from-Netezza-vs-SAS/m-p/133152#M10819</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-06-06T16:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Dates from Netezza vs SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Comparing-Dates-from-Netezza-vs-SAS/m-p/133153#M10820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. That worked like a charm. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 16:59:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Comparing-Dates-from-Netezza-vs-SAS/m-p/133153#M10820</guid>
      <dc:creator>twelch</dc:creator>
      <dc:date>2012-06-06T16:59:53Z</dc:date>
    </item>
  </channel>
</rss>

