title: T-SQL appending data to NTEXT column
body: <p>Can anyone help me figure out why I am getting the error below from the SQL script?  Any and all help is greatly appreciated.</p>
  
  <pre><code>DECLARE @Comment AS VARCHAR(2000) 
  DECLARE @Len AS INT
  SET @Comment = 'This is a test and only a test!'
  SET @Len = LEN(@Comment)
  DECLARE @ptr varbinary(16)
  SELECT @ptr = TEXTPTR(Comments)
  FROM [dbo].[StudentInfringement] AS SI
  WHERE [SI].[InfringementId] = 2
  UPDATETEXT [dbo].[StudentInfringement].[Comments] @ptr @Len NULL @Comment
  </code></pre>
  
  <p>Error message is:</p>
  
  <blockquote>
    <p>Msg 7135, Level 16, State 3, Line 9
    Deletion length -19 is not in the
    range of available text, ntext, or
    image data. The statement has been
    terminated.</p>
  </blockquote>