title: Exclude rows that return NULL for a column when using a Case statement
body: <pre><code>SELECT ir.objectid,ir.objecttype,ir.name,ir.email,ir.createdate,
  CASE objecttype
      WHEN 1 THEN (select friendlyurl
          from locations
          where id = ir.objectid)
  END as objecturl
  FROM inforequests ir
  WHERE createdate &gt; '1/1/2014' 
  order by CreateDate asc
  </code></pre>
  
  <p>This query returns 10 rows for me, but 1 row shows NULL for column <code>objecturl</code>, which happens if no record is found in the [locations] table.</p>
  
  <p>How can I alter my query to make sure that when <code>objecturl</code> IS NULL, that row is not returned, so in my case my query would only return 9 rows.</p>