title: SQL: Nesting coalesce and convert
body: <p>The version is SQL Server 2012 with SQL Server Management Studio</p>
  
  <p>My assignment requires that I create a table with the columns <code>PeopleID</code>, <code>HireDate</code> and <code>TermDate</code>. <code>TermDate</code> is to be renamed to <code>Current</code> and have Null values coalesced into 'Current Employee'. The problem here being that <code>TermDate</code> is a Null column and needs to be converted into a text column in order to be coalesced...</p>
  
  <p>I have tried numerous adjustments, but I cant seem to figure it out. This is my current iteration. Right now I get the error </p>
  
  <blockquote>
    <p>Msg 102, Level 15, State 1, Line 5<br>
    Incorrect syntax near 'TermDate'.</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>select 
     PeopleID
     ,HireDate
     ,coalesce(convert(varchar(10), TermDate, 1) TermDate, 'Current Employee') as [Current]
  from 
     WORKERS
  </code></pre>
  
  <p>Help is appreciated</p>