title: How to check string length and then select substring in Sql Server
body: <p>In a view, i have a column <strong>comments</strong> which may contain large string.
  I just want to select first 60 characters and append the '<strong>...</strong>' at the end of the selected string.</p>
  
  <p>For selecting first 60 characters i have used following query:</p>
  
  <pre><code>select LEFT(comments, 60) as comments from myview
  </code></pre>
  
  <p>Now i want its processing as below:</p>
  
  <ol>
  <li>Check it contains more then 60 characters or not.</li>
  <li>If contains then select only first 6o characters and append three dots at the end.</li>
  <li>If it doesn't contain more then 60 characters then select whole string without appending three dots at the end.</li>
  </ol>
  
  <p>Thanks</p>