title: Database Update Trigger to prevent removing specific characters at the end of the word
body: <p>I'd like to have an Update Trigger that will let user update first part of the name but will will prevent the last part from being removed. </p>
  
  <p>For example I have a column Srt_Name with <strong>CAR_GID23232</strong> entry.</p>
  
  <p>User should not have possibility to remove '<strong>_GID23232</strong>' part.
  Here's what I came to, but it doesn't work:</p>
  
  <pre><code>IF EXISTS (
  SELECT Srt_Name,Srt_Id               
  FROM inserted
  WHERE Srt_Name not like '%_GID'+CONVERT(varchar(max),Srt_GidNumer)
  )
  
  BEGIN
  RAISERROR ('Make sure that name ends with _GIDXXXX pattern.', 16, 1)
  END
  </code></pre>