title: PLSQL_trigger_check duplicate account number has erros
body: <p>Trying to create a trigger that prevents duplicate acct# and null acct balance. Trigger is able to create but when inserting an duplicate acct# to test the trigger, got error mesg that "trigger is invalid and failed re-validation". </p>
  
  <pre><code>create or replace trigger update_acct#  
  before insert or update on ACCOUNT  
  for each row  
  declare
      v_cta# NUMBER;    
  begin  
      select count(:new.A#) into v_cta# from account group by A#;   
      if (v_cta#&gt;1 or :new.bal=null) then     
          raise_application_error (-20011, 'DUPLICATE ACCOUNT NUMBER OR BAL CANNOT BE NULL');                    
      end if;  
  end;
  </code></pre>