<?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: Reading Oracle Date Issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51207#M10720</link>
    <description>my requirement is to filter the data like compensationdate&amp;gt;='1-Mar-2010'd and compensationdate&amp;lt;='31-Mar-2010'd. It works fine if we write the condition like this. But when I use sas function which returns dates doesnt work here. Eg:compensationdate&amp;lt;=intnx('month','31-Mar-2010'd,0,'E'); No error but no data. Seems like '31-Mar-2010'd is not equal to intnx('month','31-Mar-2010'd,0,'E'). My source is oracle.</description>
    <pubDate>Sat, 17 Jul 2010 04:44:28 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-07-17T04:44:28Z</dc:date>
    <item>
      <title>Reading Oracle Date Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51203#M10716</link>
      <description>Hi,&lt;BR /&gt;
    I have a requirement to read oracle date. From the source table i need to filter the data on a Date basis. In  the proc sql I need to write a where clause like 'compensationdate&amp;gt;='1-Mar-2010' and compensationdate&amp;lt;='31-Mar-2010' '.&lt;BR /&gt;
&lt;BR /&gt;
Here I converted the date to SAS date and wrote the condition like &lt;BR /&gt;
&lt;BR /&gt;
'compensationdate&amp;gt;='1-Mar-2010'd and compensationdate&amp;lt;='31-Mar-2010'd.&lt;BR /&gt;
&lt;BR /&gt;
But I have a reuirement to decide the second date dynamically. For the purpose I used the intnx('month','1-Mar-2010'd,0,'E') which supposed to return a SAS date equivalent to '31-Mar-2010'd. It returns it correctly, the numeric equivalent of '31-Mar-2010'd. &lt;BR /&gt;
&lt;BR /&gt;
But the condition doesnt work fine. &lt;BR /&gt;
compensationdate&amp;gt;='1-Mar-2010'd and compensationdate&amp;lt;='31-Mar-2010'd is working fine. But compensationdate&amp;gt;='1-Mar-2010'd and compensationdate&amp;lt;=intnx('month','1-Mar-2010'd,0,'E') is not working fine.&lt;BR /&gt;
&lt;BR /&gt;
Is not '31-Mar-2010'd equal to intnx('month','1-Mar-2010'd,0,'E') ???&lt;BR /&gt;
&lt;BR /&gt;
Whate ever the function we are using which rerturns a SAS date coudn't be compared with an oracle date.&lt;BR /&gt;
&lt;BR /&gt;
Please help me.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
      <pubDate>Fri, 16 Jul 2010 15:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51203#M10716</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-16T15:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Oracle Date Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51204#M10717</link>
      <description>It looks like you are confusing Oracle date syntax and SAS date syntax.&lt;BR /&gt;
&lt;BR /&gt;
For the Oracle extract use where OracleDate&amp;gt;='01-mar-2010'.  Once/If you have the data in a SAS dataset, then use SASDate &amp;gt;= '01mar2010'd</description>
      <pubDate>Fri, 16 Jul 2010 16:08:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51204#M10717</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2010-07-16T16:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Oracle Date Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51205#M10718</link>
      <description>Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
proc sql oracle date site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 16 Jul 2010 17:12:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51205#M10718</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-07-16T17:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Oracle Date Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51206#M10719</link>
      <description>my requirement is to filter the data like compensationdate&amp;gt;='1-Mar-2010'd and compensationdate&amp;lt;='31-Mar-2010'd. It works fine if we write the condition like this. But when I use sas function which returns dates doesnt work here. Eg:compensationdate&amp;lt;=intnx('month','31-Mar-2010'd,0,'E'); No error but no data. Seems like '31-Mar-2010'd is not equal to intnx('month','31-Mar-2010'd,0,'E'). My source is oracle.</description>
      <pubDate>Sat, 17 Jul 2010 04:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51206#M10719</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-17T04:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Oracle Date Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51207#M10720</link>
      <description>my requirement is to filter the data like compensationdate&amp;gt;='1-Mar-2010'd and compensationdate&amp;lt;='31-Mar-2010'd. It works fine if we write the condition like this. But when I use sas function which returns dates doesnt work here. Eg:compensationdate&amp;lt;=intnx('month','31-Mar-2010'd,0,'E'); No error but no data. Seems like '31-Mar-2010'd is not equal to intnx('month','31-Mar-2010'd,0,'E'). My source is oracle.</description>
      <pubDate>Sat, 17 Jul 2010 04:44:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51207#M10720</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-17T04:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Oracle Date Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51208#M10721</link>
      <description>You could try This TO_DATE(COMPENSATIONDATE)&amp;gt;= '01-Mar-10'&lt;BR /&gt;
Might just work for  u.</description>
      <pubDate>Sat, 17 Jul 2010 09:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51208#M10721</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2010-07-17T09:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Oracle Date Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51209#M10722</link>
      <description>Hi:&lt;BR /&gt;
  When you try to post code that contains &amp;lt; or &amp;lt;= or &amp;gt; or &amp;gt;=, the forum posting mechanism "thinks" you are trying to use an HTML tag and sometimes it will truncate your post while it looks for a valid HTML tag to go with the &amp;lt; and &amp;gt;.&lt;BR /&gt;
 &lt;BR /&gt;
  So, when you post code, you either&lt;BR /&gt;
1) have to edit the code in Notepad ahead of time to replace &amp;lt; with &amp;amp;lt; and to replace &amp;gt; with &amp;amp;gt; OR&lt;BR /&gt;
2) you have to substitute LT for &amp;lt; and LE for &amp;lt;= and GT for &amp;gt; and GE for &amp;gt;=&lt;BR /&gt;
 &lt;BR /&gt;
There are some other nuggest of information on posting special characters and code to the forum here:&lt;BR /&gt;
 &lt;A href="http://support.sas.com/forums/thread.jspa?messageID=27609毙" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=27609毙&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 17 Jul 2010 14:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Oracle-Date-Issue/m-p/51209#M10722</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-07-17T14:58:51Z</dc:date>
    </item>
  </channel>
</rss>

