<?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: Proc sql update in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-update/m-p/10739#M1086</link>
    <description>All manner of issues may arrive with performance including the tuning of the Oracle server.  For that you need to speak with your Oracle DBAs.&lt;BR /&gt;
&lt;BR /&gt;
As a rule of thumb though, when I load or update foreign tables from SAS, I make sure that the indexes on the foreign table are dropped first to ensure that the database is not thrashing as new data is inserted that changes an existing index.&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
&lt;BR /&gt;
David</description>
    <pubDate>Tue, 15 Apr 2008 08:30:57 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-04-15T08:30:57Z</dc:date>
    <item>
      <title>Proc sql update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-update/m-p/10738#M1085</link>
      <description>I'm trying to update records in an oracle table using the values from a SAS table.&lt;BR /&gt;
I'm testing against a SAS table (instead of the oracle table) using the following&lt;BR /&gt;
&lt;BR /&gt;
Update Oracle_Table as a&lt;BR /&gt;
      Set FCST_UNTS = (Select FCST_UNTS from SAS_Table as b&lt;BR /&gt;
	                   where a.Base_Segm_id = b.Base_segm_id and&lt;BR /&gt;
	                          a.year = b.year and&lt;BR /&gt;
			                  a.mo = b.mo),&lt;BR /&gt;
          FCST_TONS = (Select FCST_TONS from SAS_Table as b&lt;BR /&gt;
	                   where a.Base_Segm_id = b.Base_segm_id and&lt;BR /&gt;
	                          a.year = b.year and&lt;BR /&gt;
			                  a.mo = b.mo),    &lt;BR /&gt;
          FCST_REV = (Select FCST_REV from SAS_Table as b&lt;BR /&gt;
	                   where a.Base_Segm_id = b.Base_segm_id and&lt;BR /&gt;
	                          a.year = b.year and&lt;BR /&gt;
			                  a.mo = b.mo)&lt;BR /&gt;
       where a.Base_Segm_id in (Select Base_segm_id from SAS_Table ) and&lt;BR /&gt;
	         a.year in (Select Year fromSAS_Table ) and&lt;BR /&gt;
	         a.mo in (Select mo from SAS_Table ) ;&lt;BR /&gt;
&lt;BR /&gt;
There are 160,428 records in the SAS_TABLE and 409,008 records in the oracle table.  I used a smaller version of the tables initially and all seemed to work well.  &lt;BR /&gt;
However it seems to be taking forever to run the full update.&lt;BR /&gt;
&lt;BR /&gt;
Is there a better way to do this?  or do I just need to be patient?</description>
      <pubDate>Fri, 11 Apr 2008 19:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-update/m-p/10738#M1085</guid>
      <dc:creator>LAP</dc:creator>
      <dc:date>2008-04-11T19:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-update/m-p/10739#M1086</link>
      <description>All manner of issues may arrive with performance including the tuning of the Oracle server.  For that you need to speak with your Oracle DBAs.&lt;BR /&gt;
&lt;BR /&gt;
As a rule of thumb though, when I load or update foreign tables from SAS, I make sure that the indexes on the foreign table are dropped first to ensure that the database is not thrashing as new data is inserted that changes an existing index.&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Tue, 15 Apr 2008 08:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-update/m-p/10739#M1086</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-15T08:30:57Z</dc:date>
    </item>
  </channel>
</rss>

