title: Character string buffer too small error in Oracle Stored Procedure
body: <p>I am getting an error in an Oracle 11g stored procedure. The error is...</p>
  
  <p><code>ORA-06502: PL/SQL: numeric or value error: character string buffer too small</code></p>
  
  <p>It is happening at line 31, the line that contains <code>out_cnt_tot := 0;</code> I'm really not sure why there is anything wrong with that line. Another programmer created this procedure and I'm really not familiar with SQL procedures. Can anyone help me figure this out?</p>
  
  <pre><code>create or replace 
  PROCEDURE                  "FIP_BANKREC_PREP" 
                     (
      in_file_date in varchar2,
      in_bank_code in varchar2,
      out_cnt_apx_miss_no out integer,
      out_cnt_prx_miss_no out integer,
      out_cnt_apx_no_mtch out integer,
      out_cnt_prx_no_mtch out integer,
      out_cnt_ap_dup out integer,
      out_cnt_pr_dup out integer,
      out_cnt_bad out integer,
      out_cnt_ap_load out integer,
      out_cnt_pr_load out integer,
      out_cnt_ap_not_load out integer,
      out_cnt_pr_not_load out integer,
      out_cnt_tot out integer,
      out_message out varchar2
      ) as
  
  file_date date;
  ap_acct_no varchar2(16);
  pr_acct_no varchar2(16);
  
  -- ------------------------------------------------------
  --  begin logic
  -- ------------------------------------------------------
  begin
  
    file_date := to_date(in_file_date,'yyyymmdd');
    out_cnt_tot := 0;   --- THE ERROR IS ON THIS LINE ---
    out_message := 'Test Message';
  
    select brec_acct_code into ap_acct_no 
      from MSSU.zwkfi_bankrec_accts
      where brec_acct_bank = in_bank_code
        and brec_acct_type = 'AP';
  
    select brec_acct_code into pr_acct_no 
      from MSSU.zwkfi_bankrec_accts
      where brec_acct_bank = in_bank_code
        and brec_acct_type = 'PR';      
  
  // The rest of the procedure...
  </code></pre>