title: Ora-01722 Invalid Number
body: <p>I'm trying to perform an insert and I'm getting an invalid number error.
  I know where but I don't know why or how to fix this. Everything is fine (I guess).</p>
  
  <p>Here are the PL/SQL blocks:</p>
  
  <pre><code>DECLARE
    L_J_ID NUMBER := J_SEQ.NEXTVAL;
  BEGIN
  
    INSERT INTO some_table
      (J_ID, E_TABLE_COLUMN, F_TABLE_COLUMN)
    VALUES
      (L_J_ID, 'a', 'b');
  
    INSERT INTO CFG_FILTER_JOIN
      (J_ID, E_TABLE_COLUMN, F_TABLE_COLUMN)
    VALUES
      (L_J_ID, 'c', 'd');
  END;
  /
  
  DECLARE 
     var NUMBER;
  BEGIN
    SELECT ID --number
      INTO var
      FROM some_table
     WHERE F_TABLE_COLUMN = 'a'
       AND E_TABLE_COLUMN = 'b';
  
    INSERT INTO my_table
      (ID, --in table definition: number(8)
       NAME, --varchar2(30)
       TYPE, --varchar2(30)
       TABLE_name, --varchar2(30)
       J_ID,  --number(8) --here is where I get the invalid number
       COLUMN,  --varchar2(30)
       COLUMN_TYPE, --varchar2(1)
       FILTER_LIST_ID) --number(8)
    VALUES
      (SEQ.NEXTVAL,
       'COL_LIST',
       'JL',
       var,  --here is where I get the invalid number
       'NB_CTL',
       'DEST',
       'V',
       4);
  END;
  /
  </code></pre>
  
  <p>What's wrong? </p>