title: Convert result of SQL query into CSV with SQL itself?
body: <p>Is there a way to convert results of an SQL query to a CSV file using SQL itself ? I am looking for a solution that works for SQL server 2005 and above. I looked around on google and most of them suggested point-n-click options in management studio, XML based solutions and SQLcmd. I don't want those solutions.</p>
  
  <p>Can we do it in plain SQL ? EDIT - Is it possible to save the results to a CSV file using only SQL ?</p>