title: Using cast in SQL with multiple column selections
body: <p>Basically I'd like to get this command to work:</p>
  
  <pre><code>$sql = "SELECT (EntryDate + TotalTime) as DataLine FROM TimeSheet WHERE EmployeeID='AA01'";
  </code></pre>
  
  <p>EntryDate is in the database as a text, but TotalTime is a Number. I need to cast TotalTime as a text, because I've noticed if I combine two differing types of values, it just blanks out the output. </p>
  
  <p>I know I'm supposed to use CAST(TotalTime as XXX) but I'm not sure what I can legally cast it to (char/nchar doesn't seem to work, neither does string nor text). I always get an error of the form...</p>
  
  <pre><code>Syntax error (missing operator) in query expression '(EntryDate + CAST(TotalTime as string) as DataLine FROM TimeSheet WHERE EmployeeID='AA01''
  </code></pre>
  
  <p>Could I get some help? Thank you!</p>
  
  <p><strong>EDIT</strong> I would like to note this isn't intended to add together the values of EntryDate and TotalTime together to produce a single value. I simply want it to give me the EntryDate value as well as the TotalTime value combined into a single line that would read something like:</p>
  
  <p>"10/31/12 9.25"</p>
  
  <p><strong>EDIT AGAIN</strong> I'm sorry for not specifying before, I'm using MSSQL</p>