title: PL/SQL: numeric or value error: character string buffer too small %ROWTYPE
body: <p>I don't know if I am missing something but what I am doing is:</p>
  
  <p>I have a function that returns a ROWTYPE</p>
  
  <pre><code>  FUNCTION myFunc(pChar CHAR) RETURN myTable%ROWTYPE AS
      myTable_rec myTable%ROWTYPE;
    BEGIN
      SELECT col1, col2, col3
      INTO myTable_rec.col1 
        , myTable_rec.col2
        , myTable_rec.col3
      FROM myTable
      WHERE col4 = pChar;
  
      RETURN(myTable_rec);
    END B001_03;
  </code></pre>
  
  <p>then in my procedure (which calls the function above), I declared:</p>
  
  <pre><code>myTable_rec myTable%ROWTYPE;
  </code></pre>
  
  <p>but when I call in the procedure:</p>
  
  <pre><code>...
  myTable_rec := myFunc(someChar);
  ...
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>ORA-06502: PL/SQL: numeric or value error: character string buffer too small
  </code></pre>
  
  <p>Aren't the fields supposed to be FROM the same table and OF THE SAME datatype (as of my little understanding)?</p>
  
  <p>EDIT:
  I tried to SELECT * and every works. I am definitely missing something here. I just don't know that it is.</p>