title: Specify data type with column alias in SQL Server 2008
body: <p>Imagine I have the following SELECT statement in a view (SQL Server 2008):</p>
  
  <pre><code>SELECT (SELECT CASE 
                   WHEN HISTORY.OUTOFSERV = 'Y' OR HISTORY.OUTOFSERV = 'y' THEN 1 
                   ELSE 0 
                 END) AS OOS 
    FROM HISTORY
  </code></pre>
  
  <p>The column OOS ends up being of type int, but I'd like it to be of type bit. How can I accomplish this?</p>