title: SAS: How to copy a local sas table into oracle via SQL pass-through
body: <p>After making some searches that didn't lead to anything useful for me, I would like to ask you this question.</p>
  
  <p>Some background:
  I would like to create an oracle table via two different methods in order to compare performances. Actually I want to copy a table from one of my local SAS libraries to Oracle.</p>
  
  <p>I used a first method (that works perfectly) with a libname to oracle:</p>
  
  <pre><code>LIBNAME dblib ORACLE USER=usr PASSWORD="&amp;dbpwd_sas" PATH="DM_CT_TEST" SCHEMA="SAS";
  
  PROC SQL NOPRINT;
    CREATE TABLE dblib.TEST_WIN7 AS SELECT *
      FROM SASHELP.CARS
      WHERE STRIP(UPCASE(make)) EQ "ACURA"
    ;
  QUIT;
  
  LIBNAME dblib CLEAR;
  </code></pre>
  
  <p>But I also try to use another method via SQL pass-through that doesn't work:</p>
  
  <pre><code>PROC SQL NOPRINT;
    CONNECT TO ORACLE (USER=usr PASSWORD="&amp;dbpwd_sas" PATH="DM_CT_TEST");
  
    EXECUTE (  CREATE TABLE sas.TEST_WIN7 AS
               SELECT * FROM SASHELP.CARS 
               WHERE STRIP(UPCASE(make)) EQ "ACURA"
            )  BY ORACLE;
  
    DISCONNECT FROM ORACLE;
  QUIT;
  </code></pre>
  
  <p>With this method, SASHELP.cars is not found by the procedure.</p>
  
  <p>So here is my question:
  Is it possible to copy a local SAS table into oracle via an SQL pass-through? If yes, how to proceed.</p>
  
  <p>Thank you</p>