title: ORACLE: How to insert into temp table, while using dynamic sql
body: <p>I am using a few temp tables in Oracle to store some data, which is needed later in the function. To determine the data I need to store in the table, I am using a dynamic sql statement (using parameters as column names of other tables). I tried to different approaches. </p>
  
  <p>The first time, I tried something like this:</p>
  
  <pre><code>INSERT INTO temp_tableA
  EXECUTE IMMEDIATE dynamic_sql
  USING IN OUT temp_tableB
  </code></pre>
  
  <p>And the other approach was like:</p>
  
  <pre><code>EXECUTE IMMEDIATE INTO temp_tableA
  USING IN OUT temp_tableB
  </code></pre>
  
  <p>I already used some other temp table (temp_tableB) to store some data it seems, that it worked fine with the first approach, but there I did not have to use a dynamic sql statement. If I am trying to do it the same way with dynamic sql (so like the first approach) it tells  me, that the keyword VALUES is missing. 
  The second try returns the error message, that temp_tableA can't be used as an INTO-target of a SELECT/FETCH-Statement.</p>
  
  <p>What am I missing? I have to say, that I am quite new to Oracle and it's starting to drive me crazy :D</p>