title: TO_NUMBER invalid number error
body: <p>I have searched for and seen some similar questions, but none have solved my problem.  I am getting a invalid number error on my TO_NUMBER in my where clause.  Some things I have read said that it can be caused by where you place the TO_NUMBER in your where clause, so I was hoping someone could help me solve this.  Here is the where clause in my query:</p>
  
  <pre><code>WHERE year_sec = TEST.YEAR_SEC_BY_DATE ('F', 0)
     AND (year_sec = '2014F')
      AND ((no_name LIKE '54%' AND user3 IS NOT NULL)
       OR (SUBSTR (no_name, 1, 2) = '52' AND SUBSTR (no_name, 5, 1) = '8')
       OR (no_name LIKE '56%')) 
  OR (TO_NUMBER(SUBSTR(year_sec,1,4), '9999') &gt;= 2015)
       AND ((no_name LIKE '543%' AND user3 IS NOT NULL)
        OR (no_name LIKE '523%')
        OR (no_name LIKE '563%'));
  </code></pre>
  
  <p>year_sec is always 4 digits with one letter after, and never null (if it isn't then there would be much bigger problems).  So can anyone see why this would be causing the ORA-01722 error?</p>
  
  <p>EDIT: Removed quotes, error while copying over sql.</p>