<?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: Urgent help in converstion of oracle to AS in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/358939#M23628</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976" target="_self"&gt;SASKiwi&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;thank you very much for your inputs. I t&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt; Below is the code I have used as said&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;proc sql;&lt;BR /&gt;connect to oracle &amp;nbsp;(user=xxxx password=yyyy path='CMI1p' readbuff=100000);&lt;BR /&gt;select *&lt;BR /&gt;from connection to oracle (&lt;BR /&gt;SELECT&lt;BR /&gt;to_number(OLS_DYN_APPLICATIONS.APPLICATION_ID),&lt;BR /&gt;OLS_VW_MIN_STATUS_DATE.MIN_DATE_OF_EFFECT,&lt;BR /&gt;trunc(OLS_VW_APP_SUBMITTED_DATE.MIN_DATE_OF_EFFECT),.....&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 16 May 2017 07:43:11 GMT</pubDate>
    <dc:creator>hk186002</dc:creator>
    <dc:date>2017-05-16T07:43:11Z</dc:date>
    <item>
      <title>Urgent help in converstion of oracle to AS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/358917#M23623</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;I have an urgent requirment where in I have to convert the below oracle query to SAS. I am begnner in SAS, I tried&lt;BR /&gt;to paste the below query in PROC SQL under programme block and ran the query but seems that&lt;BR /&gt;we ahve few functions which needs to be converted. I am finding challenge in converting the last two lines of the code. Can anyone pls &lt;BR /&gt;help me here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SELECT
 &lt;FONT color="#FF0000"&gt; to_number(&lt;/FONT&gt;OLS_DYN_APPLICATIONS.APPLICATION_ID),
  OLS_VW_MIN_STATUS_DATE.MIN_DATE_OF_EFFECT,
 &lt;FONT color="#FF0000"&gt; trunc(&lt;/FONT&gt;OLS_VW_APP_SUBMITTED_DATE.MIN_DATE_OF_EFFECT),
  OLS_DYN_APPLICATIONS.CREATOR_ID,
  ST_STOP_APP_RSN_TYPES_HIST.DESCRIPTION,
  ( ORIGINATORS.FAMILY_NAME ) || ', ' ||( ORIGINATORS.FIRST_NAME ) ||&lt;FONT color="#FF0000"&gt; DECODE(&lt;/FONT&gt;( ORIGINATORS.MIDDLE_NAMES ),NULL,NULL,' ' || ( ORIGINATORS.MIDDLE_NAMES )),
  ORIGINATOR_ORG_UNITS.COST_CENTRE,
  OLS_DYN_APPLICATION_PRODUCTS.PROMO_CODE
FROM
 
  OLS_ST_PRODUCT_STATUSES  HISTORY_STATUSES,
  OLS_DYN_SYSTEM_USERS  ORIGINATORS,
  OLS_DYN_ORGANISATIONAL_UNITS  ORIGINATING_ORG_UNITS,
  OLS_DYN_LEGAL_ENTITIES,
  OLS_ST_SALES_CHANNEL  ORIGINATOR_ST_SALES_CHANNEL,
  OLS_DYN_LOAN_APPLICATIONS,
  OLS_DYN_STOPPED_APPLICATIONS  DYN_STOPPED_APPS_HIST,
  OLS_ST_STOP_APP_REASON_TYPES  ST_STOP_APP_RSN_TYPES_HIST,
  OLS_DYN_ORGANISATIONAL_UNITS  ORIGINATOR_ORG_UNITS,
  OLS_DYN_STOPPED_APP_REASONS  DYN_STOPPED_APP_RSNS_HIST
WHERE
  ( OLS_DYN_APPLICATIONS.APPLICATION_ID=OLS_DYN_LOAN_APPLICATIONS.APPLICATION_ID  )
  AND  ( OLS_DYN_APPLICATIONS.APPLICATION_ID=OLS_DYN_LEGAL_ENTITIES.APPLICATION_ID  )
  AND  ( OLS_DYN_LOAN_APPLICATIONS.APPLICATION_ID=OLS_DYN_APPLICATION_PRODUCTS.APPLICATION_ID  )
  AND  ( ORIGINATORS.ORGANISATIONAL_UNIT_ID=ORIGINATOR_ORG_UNITS.ORGANISATIONAL_UNIT_ID  )
  AND  ( OLS_DYN_APPLICATIONS.ORIGINATOR_ID=ORIGINATORS.SYSTEM_USER_ID  )

  AND  (
  ( ( ORIGINATOR_ORG_UNITS.ORGANISATIONAL_UNIT_NAME ) ne 'OLS Project Team' And ( ORIGINATOR_ORG_UNITS.ORGANISATIONAL_UNIT_NAME ) ne 'Mortgages - OLS/HOLO Support Desk'  )
  AND  ( OLS_DYN_LEGAL_ENTITIES.LEGAL_ENTITY_ID = (select min(DLE2.LEGAL_ENTITY_ID) from OLS_DYN_LEGAL_ENTITIES DLE2
where DLE2.APPLICATION_ID = OLS_DYN_APPLICATIONS.APPLICATION_ID)
  )
  AND  ORIGINATOR_ORG_UNITS.COST_CENTRE  NOT LIKE  '306:143'
  )
  AND  OLS_VW_PRODUCT_DETAILS.PRODUCT_NAME  NOT IN  ('Indicative Reverse Mortgage', 'Indicative Housing Loan', 'Indicative Equity Line')
 &lt;FONT color="#FF0000"&gt; AND  (trunc(OLS_DYN_APP_PROD_STATUSES.DATE_OF_EFFECT)  BETWEEN  trunc(sysdate-30) AND trunc(sysdate-1)
  OR   trunc(OLS_DYN_APPLICATIONS.PRE_TO_FULL_APPROVAL_DATE)  BETWEEN  trunc(sysdate-30) AND trunc(sysdate-1))
  )&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;thanks for taking your time.&lt;BR /&gt;Regards,&lt;BR /&gt;krishna&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 05:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/358917#M23623</guid>
      <dc:creator>hk186002</dc:creator>
      <dc:date>2017-05-16T05:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help in converstion of oracle to AS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/358921#M23624</link>
      <description>&lt;P&gt;I tried to write the decode funtion as&lt;BR /&gt;select family_name||','||first_name|| case when MIDDLE_NAMES is null then ' ' else ' '|| MIDDLE_NAMES end,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and for &lt;STRONG&gt;to_number&lt;/STRONG&gt;(&lt;SPAN&gt;OLS_DYN_APPLICATIONS.APPLICATION_ID&lt;/SPAN&gt;) ----------to&amp;nbsp;informat OLS_DYN_APPLICATIONS.APPLICATION_ID $2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not sure if I am right here&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 06:08:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/358921#M23624</guid>
      <dc:creator>hk186002</dc:creator>
      <dc:date>2017-05-16T06:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help in converstion of oracle to AS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/358926#M23625</link>
      <description>&lt;P&gt;Why to you need to convert it? If you wrap it in an a SAS SQL PASSTHRU query you don't have to change any of your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  connect to oracle(--- put your Oracle connection stuff here ----);
  create table want as select * 
  from connection to oracle(

---- put your Oracle query here -----

  );
  disconnect from oracle;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 07:04:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/358926#M23625</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-05-16T07:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help in converstion of oracle to AS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/358939#M23628</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976" target="_self"&gt;SASKiwi&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;thank you very much for your inputs. I t&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt; Below is the code I have used as said&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;proc sql;&lt;BR /&gt;connect to oracle &amp;nbsp;(user=xxxx password=yyyy path='CMI1p' readbuff=100000);&lt;BR /&gt;select *&lt;BR /&gt;from connection to oracle (&lt;BR /&gt;SELECT&lt;BR /&gt;to_number(OLS_DYN_APPLICATIONS.APPLICATION_ID),&lt;BR /&gt;OLS_VW_MIN_STATUS_DATE.MIN_DATE_OF_EFFECT,&lt;BR /&gt;trunc(OLS_VW_APP_SUBMITTED_DATE.MIN_DATE_OF_EFFECT),.....&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 07:43:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/358939#M23628</guid>
      <dc:creator>hk186002</dc:creator>
      <dc:date>2017-05-16T07:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help in converstion of oracle to AS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359176#M23637</link>
      <description>&lt;P&gt;You aren't getting the usual SAS log messages at the end of your SQL step. That suggests an unbalanced quote, bracket or something similar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Copy the Oracle code back into your Oracle query tool (SQL Plus?) and run it there - does it run correctly? If not correct it until it does then paste it back into your SAS program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 19:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359176#M23637</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-05-16T19:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help in converstion of oracle to AS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359217#M23641</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/118578"&gt;@hk186002&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I believe you're missing a closing bracket.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Oracle SQL you've posted ends with a closing bracket:&lt;/P&gt;
&lt;PRE&gt;  OR   trunc(OLS_DYN_APPLICATIONS.PRE_TO_FULL_APPROVAL_DATE)  BETWEEN  trunc(sysdate-30) AND trunc(sysdate-1))
 &lt;STRONG&gt;&lt;FONT color="#800080"&gt; )&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;When you wrap this into a SAS SQL pass-through block then it should look like what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;posted.&lt;/P&gt;
&lt;PRE&gt;proc sql;
  connect to oracle(--- put your Oracle connection stuff here ----);
  create table want as select * 
  from connection to oracle&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;

---- put your Oracle query here -----

&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;  );&lt;/STRONG&gt;&lt;/FONT&gt;
  disconnect from oracle;
quit;&lt;/PRE&gt;
&lt;P&gt;Looking into the log you've posted, the closing bracket for the&amp;nbsp;&lt;EM&gt;from connection to oracle (....)&lt;/EM&gt; is missing.&lt;/P&gt;
&lt;P&gt;Line 104 in the log you've posted needs another closing bracket. I'd expect your code to look like:&lt;/P&gt;
&lt;PRE&gt;103          OR   trunc(OLS_DYN_APPLICATIONS.PRE_TO_FULL_APPROVAL_DATE)  BETWEEN  trunc(sysdate-30) AND trunc(sysdate-1))
104           &lt;FONT color="#800000"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;
          &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 May 2017 22:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359217#M23641</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-05-16T22:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help in converstion of oracle to AS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359236#M23644</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much for the help...the passthrough worked and was the issue with brackets.....thanks gurus...bit pressure releaved...now its time to learn some SAS stuff ....thanks again...&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 00:42:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359236#M23644</guid>
      <dc:creator>hk186002</dc:creator>
      <dc:date>2017-05-17T00:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help in converstion of oracle to AS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359240#M23645</link>
      <description>&lt;P&gt;Great to hear. In that case please mark your post as answered.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 00:57:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359240#M23645</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-05-17T00:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help in converstion of oracle to AS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359246#M23646</link>
      <description>Thank you Patrick...it worked:)&lt;BR /&gt;</description>
      <pubDate>Wed, 17 May 2017 02:18:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Urgent-help-in-converstion-of-oracle-to-AS/m-p/359246#M23646</guid>
      <dc:creator>hk186002</dc:creator>
      <dc:date>2017-05-17T02:18:55Z</dc:date>
    </item>
  </channel>
</rss>

