title: Teradata: How to compare potentially null fields without using coalesce?
body: <p>We are using a query that uses coalesce to compare potentially null values.  I want to get away from this because not only does it make queries more difficult to maintain, it's flat out ugly.  Imagine this:</p>
  
  <p><code>where coalesce(tbl1.field,'~') &lt;&gt; Coalesce(tbl2.field,'~')</code></p>
  
  <p>...being repeated 30+ times in a where clause.  Hecky nah.</p>
  
  <p>I had been under the impression that EXISTS would allow me to circumvent this fugliness, but it turns out that I was wrong.</p>