<?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: Fetch Oracle Data by joining SAS table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844244#M333769</link>
    <description>&lt;P&gt;Your process is inefficient by design so don't expect efficiency.&lt;BR /&gt;Work with database teams to discuss ways and means to upload data to Oracle database .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 00:35:04 GMT</pubDate>
    <dc:creator>Sajid01</dc:creator>
    <dc:date>2022-11-15T00:35:04Z</dc:date>
    <item>
      <title>Fetch Oracle Data by joining SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844237#M333766</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3,000 customers in SAS table and I want to fetch data from Oracle for those customers. there are billions of records in Oracle table. I am using Oracle Lib and joining sas data with it, but the solution is not efficient, takes ages to run.&lt;/P&gt;&lt;P&gt;Please note that&amp;nbsp;I don't have rights to create temp table in Oracle so cannot ingest 3,000 customers in oracle table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sample code is&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname SASTABLE&lt;/P&gt;&lt;P&gt;libname ORATABLE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select A.* from oratable as a inner join sastable as b on a.cust_ID=b.cust_ID;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 23:43:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844237#M333766</guid>
      <dc:creator>cheema11</dc:creator>
      <dc:date>2022-11-14T23:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Oracle Data by joining SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844242#M333768</link>
      <description>&lt;P&gt;With only 3,000 customers, building a WHERE IN list using a macro variable should speed things up:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Cust_List;
input CustID $;
datalines;
12345678
87654321
12344321
;
run;

proc sql noprint;
select quote(CustID)
into :Cust_List separated by ','
from Cust_List
;
quit;

%put Cust_List = &amp;amp;Cust_List;

libname oralib noprompt = '&amp;lt; Put Oracle connection string here&amp;gt;';

proc sql;
  create table Customers as
  select *
  from ORALIB.Customers
  where CustID in (&amp;amp;Cust_List)
  ;
quit; 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Nov 2022 00:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844242#M333768</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-11-15T00:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Oracle Data by joining SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844244#M333769</link>
      <description>&lt;P&gt;Your process is inefficient by design so don't expect efficiency.&lt;BR /&gt;Work with database teams to discuss ways and means to upload data to Oracle database .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 00:35:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844244#M333769</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2022-11-15T00:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Oracle Data by joining SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844251#M333771</link>
      <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;. Just one more query.&lt;BR /&gt;I am getting below error while creating the macro variable.&lt;BR /&gt;&lt;BR /&gt;"The length of the value of the macro variable CUST_LIST (65540) exceeds the maximum length (65534). The value has been truncated to 65534 characters."&lt;BR /&gt;any idea how to fix this? One way is to go by 1000 customers separately, any thing more efficient?</description>
      <pubDate>Tue, 15 Nov 2022 01:40:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844251#M333771</guid>
      <dc:creator>cheema11</dc:creator>
      <dc:date>2022-11-15T01:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Oracle Data by joining SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844253#M333772</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/434820"&gt;@cheema11&lt;/a&gt;&amp;nbsp; - Is your list longer than 3,000 customers then? How long is each cust ID? Please ensure you are not including blanks -&amp;nbsp;quote(strip(CustID)). If the length is still over 65K, then splitting it into multiple macro variables is easy.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 01:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetch-Oracle-Data-by-joining-SAS-table/m-p/844253#M333772</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-11-15T01:52:02Z</dc:date>
    </item>
  </channel>
</rss>

