title: Trigger raiseerror function incorrect syntax
body: <p>I have trigger &amp; inside code is:</p>
  
  <pre><code>declare    
      @errno int,
      @errmsg varchar(255),
  
  if exists (select 1
             from audit t2, inserted i1, deleted d1
             where t2.user_id = d1.cpi_id
               and (i1.cpi_id != d1.cpi_id))
  begin
      select 
          @errno = 30005,
          @errmsg = 'Children still exist in "audit". Cannot modify parent code in "cpi_user".'
         goto error
  end
  
  /*  Errors handling  */
  error:
      raiserror @errno @errmsg
      rollback  transaction
  </code></pre>
  
  <p>When I execute this, I get this error </p>
  
  <blockquote>
    <p>Incorrect syntax near '@errno'</p>
  </blockquote>
  
  <p>Weird thing is, same code was working before &amp; suddenly it's showing an error.</p>
  
  <p>Can you let me know what I am doing wrong?</p>