title: How to do not null check on LEFT function on the select query
body: <p>I have a query that returns some demographics like firstName, lastName, MiddleName and i need to use LEFT function on each to filter the First Letter of each column like LEFt(firstName, 1).This is working fine when each column is not a null value. when it is null value</p>
  <pre><code> select otherColumns, LEFT(sub.LastName, 1) + ',' + LEFT(sub.FirstName, 1) + ' ' + LEFT(sub.MiddleName, 1) as patientInitials from &lt;table&gt; &lt;inner joins&gt; &lt;some where conditions&gt;;
  </code></pre>
  <p>But when one of demographics like middleName is null and other firstName, lastName are not null , patientInitials are evaulating to NULL, not sure why?</p>
  <p>I resolved my issue by adding <strong>COALESCE</strong></p>
  <pre><code> LEFT(sub.LastName, 1) + ',' + LEFT(sub.FirstName, 1) + ' ' + COALESCE((LEFT(sub.MiddleName, 1)),'') as patientInitials 
  </code></pre>
  <p>But is there any other good way to check for notNull on the LEFT function ??</p>
  <p>Help Appreciated!</p>