Insert statement with where condition throws error
<p>The following SQL statement throws error in Oracle:</p>

<pre><code>INSERT INTO TABLE1 (ACCT_NB, ACCT_TYPE, TOKEN_ID)
SELECT ACCT_NB, 'A', ID FROM TABLE2
WHERE NOT IN (SELECT ACCT_NB FROM TABLE1 
              WHERE ACCT_TYPE='A' AND TABLE1.ACCT_NB=TABLE2.ACCT_NB)
</code></pre>

<p>SQL command not ended properly. 
Please help out on correcting the query</p>