title: How can I pass column and table name as parameters to a SQL stored procedure
body: <pre><code>CREATE OR REPLACE FUNCTION getIdFromNameParameter 
      (columnName VARCHAR2, tableName VARCHAR2, whereColumn VARCHAR2, parameterColumn VARCHAR2)
  RETURN VARCHAR2
  AS
      idCatc VARCHAR2(50);
  BEGIN
      execute immediate 'SELECT ' || columnName || ' INTO ' || idCatc || ' FROM ' || tableName || ' WHERE ' || whereColumn || ' = ' ||  parameterColumn;
      RETURN idCatc;
  END;
  /
  </code></pre>
  
  <p>I get this warning:</p>
  
  <blockquote>
    <p>Warning: Function created with compilation errors</p>
  </blockquote>