title: My first sql trigger in sql server 2008
body: <p>I tried to execute the following code when I ran into a wierd error.
  I hope you guys can help me out here :)</p>
  
  <pre><code>CREATE TRIGGER Vlucht_Duurtussenstop
     ON  dbo.Vlucht
     AFTER UPDATE,INSERT
  AS 
  BEGIN
   IF (new.Duurtussenstop &lt;&gt; old.Duurtussenstop)
      BEGIN
        EXECUTE dbo.testprocudure1
           @p_vluchtDuurtussenstop = Duurtussenstop
      END
  END
  GO
  </code></pre>
  
  <p>Gives</p>
  
  <pre><code>[15:50:03] Gert-Jan Bos: Msg 102, Level 15, State 1, Line 7
  Incorrect syntax near ' '.
  Msg 102, Level 15, State 1, Line 12
  Incorrect syntax near ' '.
  Msg 102, Level 15, State 1, Line 14
  Incorrect syntax near ' '.
  </code></pre>