- Open SQL Server Management Studio
- Go to Tools > Options > Query
Results > SQL Server > Results To Text
- On the far right, there is a drop
down box called Output Format
- Choose Comma Delimited and click OK
Here's a full screen version of that image, below
This will show your query results as comma-delimited text.
To save the results of a query to a file: Ctrl + Shift + F