title: INTO CLAUSE IS NOT PERMITTED
body: <p>I created Dynamic DB2 Stored procedure for select. I'm going to use this generic query to execute multiple select statement, by passing the parameter.</p>
  
  <pre><code>SET V_SELECT =                   
    'SELECT ' || SELECT_FIELDS ||  
    ' INTO '  || INTO_FIELDS   ||  
    ' FROM '  || TABLE_NAME    ||  
    ' WHERE ' || WHERE_CLAUSE  ||  
    ' WITH UR';    
  EXECUTE IMMEDIATE V_SELECT;     
  </code></pre>
  
  <p>Below is how my query will look a like.</p>
  
  <pre><code>   SELECT B.PROD_TYP  
     INTO HOST_VAR_PROD_TYP
     FROM TABLE_A   A
     INNER JOIN TABLE_B  B
     ON A.ROW_ID = B.ROW_ID
     WHERE A.PROD_CD = HOST_VAR_PROD_CD;
  </code></pre>
  
  <p>When I run this I'm getting </p>
  
  <blockquote>
    <p>"INTO CLAUSE IS NOT PERMITTED". </p>
  </blockquote>
  
  <p>Thanks in Advance.          </p>