title: Enterprise Architect, database trigger generation (oracle) and a double semicolon
body: <p>Is there a way in EA to devide all statments by semicolon and at the same time have only one semicolon after a create trigger statement?</p>
  
  <p>Problem:</p>
  
  <p>I'm generating triggers for a oracle db with EA 8.0 by defining the primary key as a number(18,0) and setting the AutoNum in column properties to True.
  <img src="https://i.stack.imgur.com/WaXYQ.png" alt="Column Properties"></p>
  
  <p>Then selecting following checkboxes in the 'Generate DDL' Dialog
  <img src="https://i.stack.imgur.com/ntvJx.png" alt="Generate DDL"></p>
  
  <p>What EA generates for a trigger is </p>
  
  <pre><code>CREATE OR REPLACE TRIGGER TRG_Foo_id 
  BEFORE INSERT 
  ON Foo 
  FOR EACH ROW 
  BEGIN 
      SELECT SEQ_Foo_id.NEXTVAL 
      INTO :NEW.id 
      FROM DUAL; 
  END;;
  </code></pre>
  
  <p>Inserting that trigger into PL/SQL Developer it shows a compile error with the message </p>
  
  <blockquote>
    <p>PLS-00103: Found Symbol ";" </p>
  </blockquote>
  
  <p>When doing a </p>
  
  <pre><code>select * from SYS.USER_ERRORS
  </code></pre>
  
  <p>When not specifing a 'SQL Terminator' the trigger is created (because the create statement ends with one semicolon instead of two) without any error but then all other create table statements do not end with a semicolon which leads to a 'ORA-00922: missing or invalid option' because the statements are not separated by semicolon.</p>
  
  <p>I did not find a direct way to influence the trigger code being generated, only for languages like C,Java <a href="http://www.sparxsystems.com/enterprise_architect_user_guide/software_development/thecodetemplateeditor.html" rel="nofollow noreferrer">see</a>  but not for Database Code. </p>