Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Is there any way to get the query to be exported with the results?

$
0
0
So far, I have been using SQL Server management studio by writing queries then saving the results into CSV by right clicking on the results and saving them (from the results grid). I have found how to get the query to be produced as part of the results set (Query - Query Options - Results - Grid - then tick the box that says include the query in the results set). But this brings the results up onto a new tab behind the results grid. I would like to know whether I can export/save the data in a way that includes the query script. Thanks in advance.

Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>