title: #PLSQL_Trigger duplicate customer doesnt work
body: <p>Homework requirement: create a trigger where account must belong to one and only one customer. </p>
  
  <p>My code as shown below doesn't work. 
  Error mesg: quoted string not properly terminated. Please help.</p>
  
  <pre><code>create or replace trigger dupcust
  before insert or update on ACCOUNT
  for each row
  declare
      v_ctn NUMBER;
  begin
      select count(account.cname) into v_ctn from account where A#=:new.A#;
      if v_ctn&gt;0 then  
          raise_application_error (-20107, 'ACCT CAN ONLY BELONG TO ONE CUSTOMER');
      end if;
  end;
  </code></pre>
  
  <p>Test code:</p>
  
  <pre><code>UPDATE ACCOUNT SET ACCOUNT.CNAME =’Cook’ WHERE ACCOUNT.A# = ‘1111’;
  </code></pre>