title: Replace string in UNITEXT column sybase database
body: <p>We are using Sybase database and have the below table.</p>
  
  <pre><code>CREATE TABLE table_1
  (id            VARCHAR(50) NOT NULL
  ,data_values   UNITEXT         NULL
  ,last_modified DATETIME        NULL)
  </code></pre>
  
  <p>I have requirement to replace the word stored the data_values column which is of UNITEXT type.</p>
  
  <p>I found <a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc32300.1550/html/sqlug/sqlug217.html" rel="nofollow noreferrer">link</a> but this is not helping how we can replace the words.</p>
  
  <p>Query that I tried is below.</p>
  
  <pre><code>declare @val varbinary(16)
  select  @val = textptr(data_values) from table_1
  writetext table_1.data @val "Some text"
  </code></pre>
  
  <p>I have to dynamically generate the text to be set in data_values field. Text itself will be fetched from same column itself and have to processed(few words changes) before setting to the field.</p>