Update a varchar with number in SQL Server
<p>In my table I have a <code>varchar</code> column that I want to updated with another data. The <code>varchar</code> column is like  this for example: <code>AB1600150</code>.</p>

<p>I am trying to update this column to decrease the number attached so the column data will be <code>AB1600149</code>.</p>

<p>I executed this code:</p>

<pre><code>UPDATE [SONE].[dbo].[F_DOC] 
SET [DC_Piece] = 'FA' + MAX(RIGHT([DC_Piece], 7)) - 1   
WHERE [cbMarq] = 8
</code></pre>

<p>I got this error:</p>

<blockquote>
  <p>it lacks an aggregate in the definition list of an UPDATE statement .</p>
</blockquote>

<p>Please help me.</p>