title: SQL Server : how do I read the last character of a string, and add a new character
body: <p>How to read a string and if there is no <code>,</code> (comma) at the end of that string add a <code>,</code> (comma) to end of it.</p>
  
  <pre><code>@customernumber='583473,789458'
  </code></pre>
  
  <p>after system checking there is no comma add <code>,</code> (comma) and make it like below</p>
  
  <pre><code>@customernumber='583473,789458,'
  </code></pre>