Question: how to export data from sql server to file?
Answer: In the following box you get an option to save what was shown in the grid as a CSV or a tab delimited file. ... 
Then, OK on that, and go back to the main SSMS screen.
Then press the toolbar button “Results to file” (or Ctrl + Shift + F) ... 
It will then open up an Import/Export wizard. ... 
Choose the destination for your data.