<?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: Translate a Oracle Query to Proc SQL in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287287#M59543</link>
    <description>&lt;P&gt;nvl - &lt;A href="https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2048.htm" target="_blank"&gt;https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2048.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;instr -&amp;nbsp;&lt;A href="https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_1103.htm" target="_blank"&gt;https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_1103.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;just trying to help.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2016 17:47:50 GMT</pubDate>
    <dc:creator>saspert</dc:creator>
    <dc:date>2016-07-26T17:47:50Z</dc:date>
    <item>
      <title>Translate a Oracle Query to Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287262#M59541</link>
      <description>&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;I’m trying to translate an oracle query to proc sql.&amp;nbsp; I am still pull through a connection to an oracle environment but I have to use proc sql in SAS.&amp;nbsp; There is a section in the query I am having trouble translation.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;I don't think I can use the&lt;SPAN class="apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'Helvetica','sans-serif';"&gt; Instr &amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;and&lt;SPAN class="apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'Helvetica','sans-serif';"&gt;NVL&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class="apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;within &amp;nbsp;a proc sql statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;Any assistance will be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
connect to oracle (user=polodm password=polodm path='K6PPOLDM');
create table CUSTOMER_TRANS as
select * 
from connection to oracle (
select distinct 
cu.mstr_customer_id, 
t.customer_id
from mbs.sas_transaction_vw t inner join mbs.sas_customer_vw cu
on cu.customer_id = t.customer_id
where t.transaction_date &amp;gt;= '01AUG2014' &amp;nbsp;and t.transaction_date &amp;lt;= '30AUG2014'&amp;nbsp;
and t.transaction_type = 1
and t.business_unit IN (1,3)
and not in (
select customer_id
from mbs.sas_customer_bu_vw where business_unit = 3 
&lt;STRONG&gt;and Instr(substr(rtm_bulk_flags,1,3),'Y') &amp;gt; 0
or Instr(NVL(suppress_reasons, ' '),'E') &amp;gt; 0 /*Employees*/
or Instr(NVL(suppress_reasons, ' '),'F') &amp;gt; 0 /*Fraud*/)&lt;/STRONG&gt;
and business_unit in (1,3)
and customer_id = t.customer_id)
disconnect from oracle;quit; &lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jul 2016 16:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287262#M59541</guid>
      <dc:creator>RobertNYC</dc:creator>
      <dc:date>2016-07-26T16:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Translate a Oracle Query to Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287268#M59542</link>
      <description>&lt;P&gt;For those of use that do not use Oracle you could describe what INSTR and NVL do.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 16:54:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287268#M59542</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-26T16:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Translate a Oracle Query to Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287287#M59543</link>
      <description>&lt;P&gt;nvl - &lt;A href="https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2048.htm" target="_blank"&gt;https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2048.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;instr -&amp;nbsp;&lt;A href="https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_1103.htm" target="_blank"&gt;https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_1103.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;just trying to help.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 17:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287287#M59543</guid>
      <dc:creator>saspert</dc:creator>
      <dc:date>2016-07-26T17:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Translate a Oracle Query to Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287291#M59544</link>
      <description>&lt;P&gt;I think you might just want the &lt;A href="https://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#p00ab6ey29t2i8n1ihel88tqtga9.htm" target="_self"&gt;FIND function&lt;/A&gt; (if working with SAS data) or the &lt;A href="https://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#n04ha26lk1sr1in1043awq6wav80.htm" target="_self"&gt;INDEXC function&lt;/A&gt; is an old-school method that could work too.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 17:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287291#M59544</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-07-26T17:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Translate a Oracle Query to Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287321#M59545</link>
      <description>&lt;P&gt;So you have a SAS SQL passthru query that works fine on Oracle and you HAVE to translate it into SAS SQL. Why?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 19:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Translate-a-Oracle-Query-to-Proc-SQL/m-p/287321#M59545</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-07-26T19:44:05Z</dc:date>
    </item>
  </channel>
</rss>

