title: Stored Function in Oracle not Inserting Values into the desired table
body: <p>Here is my Code given below. I am trying to add 5 parameters which the function takes into the table Employee. But I am not successful in doing it and have tried a lot of things.</p>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p>ORA-01858: a non-numeric character was found where a numeric was
    expected ORA-06512: at "xxxxxxx.A1SF_ADDEMP", line 14
    01858. 00000 -  "a non-numeric character was found where a numeric was expected"
    *Cause:    The input data to be converted using a date format model was
               incorrect.  The input data did not contain a number where a number was
               required by the format model.
    *Action:   Fix the input data or the date format model to make sure the
               elements match in number and type.  Then retry the operation.</p>
  </blockquote>
  
  <p>Plus how do I test a Stored function that has a Insert/Update or Delete Statement in it?</p>
  
  <p><strong>Execution Statement</strong></p>
  
  <pre><code>Select A1SF_ADDEMP('Adesh', '33', 'M', 8000, '26/03/1990')
  From dual;
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <pre><code>CREATE OR REPLACE Function A1SF_ADDEMP
          (pEmpName In Varchar2,
          pTaxFileNo In Varchar2,
          pGender In Varchar2,
          pSalary In Number,
          pBirthdate In Varchar2
          ) Return Varchar2
          Is
            tEmpId Number(38,0);
            tBirthDate Date;
  
          BEGIN
                tEmpId := A1Seq_Emp.nextval;
                tBirthdate := to_date('pBirthdate','dd/mm/yyyy');
  
                 Insert Into Employee(EmpId, EmpName, TaxFileNo, Gender, Salary, Birthdate)
                  Values (tEmpId, pEmpName, pTaxFileNo, pGender, pSalary, tBirthdate);                 
                  Commit;
                  Return null;
          END;
  </code></pre>