<?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 Using SAS Where clause in Oracle in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Where-clause-in-Oracle/m-p/479056#M123598</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get the max date&amp;nbsp;in the prior month&amp;nbsp;from an Oracle table using SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let tday = %sysfunc(today());&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;proc means data=Oracle_Table noprint;
	 where fin_metric_id in(6,8) and (intnx('month',&amp;amp;tday,-1,'begin')&amp;lt;=input(put(dt_id,z8.),yymmdd8.)&amp;lt;=intnx('month',&amp;amp;tday,-1,'end'));
	 var dt_id;
	 output out=maxdatei max=alt_inv_dt;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the correct data from this code but I get this warning message that I want to eliminate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: The WHERE clause contains SAS-specific syntax that cannot be passed to the DBMS.&lt;/P&gt;&lt;P&gt;WARNING: SQL generation was not performed because the WHERE clause could not be created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if it likes the Begin and End in my INTNX function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jul 2018 13:58:43 GMT</pubDate>
    <dc:creator>EEng</dc:creator>
    <dc:date>2018-07-18T13:58:43Z</dc:date>
    <item>
      <title>Using SAS Where clause in Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Where-clause-in-Oracle/m-p/479056#M123598</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get the max date&amp;nbsp;in the prior month&amp;nbsp;from an Oracle table using SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let tday = %sysfunc(today());&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;proc means data=Oracle_Table noprint;
	 where fin_metric_id in(6,8) and (intnx('month',&amp;amp;tday,-1,'begin')&amp;lt;=input(put(dt_id,z8.),yymmdd8.)&amp;lt;=intnx('month',&amp;amp;tday,-1,'end'));
	 var dt_id;
	 output out=maxdatei max=alt_inv_dt;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the correct data from this code but I get this warning message that I want to eliminate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: The WHERE clause contains SAS-specific syntax that cannot be passed to the DBMS.&lt;/P&gt;&lt;P&gt;WARNING: SQL generation was not performed because the WHERE clause could not be created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if it likes the Begin and End in my INTNX function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 13:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Where-clause-in-Oracle/m-p/479056#M123598</guid>
      <dc:creator>EEng</dc:creator>
      <dc:date>2018-07-18T13:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Where clause in Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Where-clause-in-Oracle/m-p/479108#M123615</link>
      <description>No, it doesn't like the INTNX function as such.&lt;BR /&gt;See here for supported functions:&lt;BR /&gt;&lt;A href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=acreldb&amp;amp;docsetTarget=p0f64yzzxbsg8un1uwgstc6fivjd.htm&amp;amp;locale=sv" target="_blank"&gt;http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=acreldb&amp;amp;docsetTarget=p0f64yzzxbsg8un1uwgstc6fivjd.htm&amp;amp;locale=sv&lt;/A&gt;&lt;BR /&gt;But can't see anything that would stop you to use it prior to the PROC using %sysfunc.</description>
      <pubDate>Wed, 18 Jul 2018 15:21:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Where-clause-in-Oracle/m-p/479108#M123615</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-07-18T15:21:00Z</dc:date>
    </item>
  </channel>
</rss>

