<?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 Oracle-SAS EG code in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48238#M5331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://communities.sas.com/people/renjithr" id="jive-627032411202897461803" onmouseout="" onmouseover=""&gt;renjithr&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem for sure is the semi-colon before your where clause &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;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gozzi78&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Mar 2012 18:51:50 GMT</pubDate>
    <dc:creator>Gozzi78</dc:creator>
    <dc:date>2012-03-16T18:51:50Z</dc:date>
    <item>
      <title>Oracle-SAS EG code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48232#M5325</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 am trying to run a code like below:&lt;/P&gt;&lt;P&gt;LIBNAME eee META LIBRARY=zz_Oracle_zz_Library;&lt;/P&gt;&lt;P&gt;%Let begencyr = '2010-01-01';&amp;nbsp; &lt;/P&gt;&lt;P&gt;%Let begrptyr = '01Jan2011'D; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SQL outobs=10;&lt;/P&gt;&lt;P&gt;CREATE TABLE TEMPTEST AS&lt;/P&gt;&lt;P&gt;SELECT&amp;nbsp; inpat_end_dt&lt;/P&gt;&lt;P&gt; from&lt;/P&gt;&lt;P&gt;eee.rerere enc;&lt;/P&gt;&lt;P&gt;where to_char(enc.end_dt, 'YYYY-MM-DD') between &amp;amp;begencyr. and &amp;amp;endencyr.;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the following warning:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where to_char(enc.end_dt, 'YYYY-MM-DD') between &amp;amp;begencyr. and &amp;amp;endencyr.;&lt;/P&gt;&lt;P&gt;WARNING: This SAS global statement is not supported in PROC SQL. It has been ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what is wrong.Is to_char not supported in EG?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 01:47:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48232#M5325</guid>
      <dc:creator>renjithr</dc:creator>
      <dc:date>2012-02-08T01:47:22Z</dc:date>
    </item>
    <item>
      <title>Oracle-SAS EG code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48233#M5326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TO_CHAR is an Oracle-specific SQL function. Your code uses SAS SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggest you change your WHERE statement to: where enc.end_dt between &amp;amp;begencyr. and &amp;amp;endencyr.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This assumes of course that END_DT is defined in Oracle as data type DATE. You may want to confirm this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 02:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48233#M5326</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2012-02-08T02:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle-SAS EG code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48234#M5327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.End_dt field is defined as date time format.Is there any way I can convert the end_dt variable in the above format in the WHERE clause itself?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,the above code runs in PC sas ,so I thought it would run in SAS EG...any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 04:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48234#M5327</guid>
      <dc:creator>renjithr</dc:creator>
      <dc:date>2012-02-08T04:31:25Z</dc:date>
    </item>
    <item>
      <title>Oracle-SAS EG code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48235#M5328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Renjithr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On "Also,the above code runs in PC sas ,so I thought it would run in SAS EG...any thoughts?", the reason that it runs directly through your SAS server and not when it is coming from EGuide is likely because EGuide has set some system option that prevents the passthrough like that.&amp;nbsp; To debug that sort of issue is a little tedious.&amp;nbsp; My way is to open EGuide, turn logging on, close EGuide, open EGuide (this gets some of those "hidden" options to surface), run your program, and then look at the log.&amp;nbsp; Once you find the offending option, you may be able to turn it back off in your code.&amp;nbsp; If Chris sees this, he may have an easier way to find the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 14:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48235#M5328</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2012-02-08T14:36:07Z</dc:date>
    </item>
    <item>
      <title>Oracle-SAS EG code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48236#M5329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since the end_dt column is date time then this WHERE should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where enc.end_dt between '01JAN2012:00:00:00'dt and '31JAN2012:00:00:00'dt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The key thing here is the use of DT on the datetime string to tell SAS this is a datetime and to handle it accordingly. SAS should then parse this correctly into PL/SQL when run on an Oracle database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 19:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48236#M5329</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2012-02-08T19:38:10Z</dc:date>
    </item>
    <item>
      <title>Oracle-SAS EG code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48237#M5330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Apart from the date formatting issue, you have a ; after the from clause, so there is no chance that this code run without error in any SAS session.And that is what causes the error. &lt;/P&gt;&lt;P&gt;And I don't think that this is valid in Oracle SQL either.&lt;/P&gt;&lt;P&gt;There is also a RUN, which also is not valid SQL syntax, but will only render in a NOTE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Linus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 08:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48237#M5330</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-02-09T08:09:39Z</dc:date>
    </item>
    <item>
      <title>Oracle-SAS EG code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48238#M5331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://communities.sas.com/people/renjithr" id="jive-627032411202897461803" onmouseout="" onmouseover=""&gt;renjithr&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem for sure is the semi-colon before your where clause &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;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gozzi78&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 18:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48238#M5331</guid>
      <dc:creator>Gozzi78</dc:creator>
      <dc:date>2012-03-16T18:51:50Z</dc:date>
    </item>
    <item>
      <title>Oracle-SAS EG code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48239#M5332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like others have already chimed in on the syntax of this particular example, but I'll just add that one difference in EG is that EG sets OPTIONS VALIDVANAME=ANY by default.&amp;nbsp; That can sometimes have an effect, though usually it affects only operations such as PROC IMPORT (transcribing Excel column names in a different way).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 12:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Oracle-SAS-EG-code/m-p/48239#M5332</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2012-03-20T12:43:07Z</dc:date>
    </item>
  </channel>
</rss>

