Add option to context menu in Results Grid: Save As Table - by Erland Sommarskog

Status : 


Sign in
to vote
ID 776369 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 1/11/2013 12:35:10 PM
Access Restriction Public


Sometimes when you have a query result, you find that you want to make further analysis on the result. Maybe resort it, maybe filter it further, or just save it for later. Today, you can easily copy the data to Excel, but a DBA does not want data in Excel, he wants it in a database! So why not provide an option to save the result set in a table? "So what, just rerun the query, and this time add an INTO or INSERT clause?", I can hear the skeptic Program Manager from Microsoft say. But there are plenty of situations where is not feasible:

1) The query takes a long time to run, and causes a load on a production system and it is not permissible to rerun it.
2) The data may come from a DMV and includes a momentary situation, for instance a blocking scenario, which cannot be reproduced.
3) The result comes from a stored procedure which produces many columns, and composing the CREATE TABLE statement for the table is a major headache.
4) You want to save the result on a different server for whatever reason.
5) Drum roll! The result may not exist on a single server, because it is the result ot a multi-server query.

Kudos to SQL Server MVP Arnie Rowland for giving me the inspiration.
Sign in to post a comment.
Posted by Microsoft on 2/7/2013 at 8:02 PM
Hi!, thanks for writing in to Microsoft and providing this great suggestion.

We took a look at this request recently and triaged it against several others and unfortunately, it did not meet the bar to be fixed. While we are closing this issue as 'won't fix', we have taken note of this internally and we will try & incorporate this request when we revisit this functionality in a future release of SSMS.

Sanjay Nagamangalam, SQL Server Manageability
Posted by SAinCA on 1/11/2013 at 4:52 PM
Totally support the request. The free SSMS Tools (NO LONGER FREE FOR SQL 2012, THOUGH!) lets us script as INSERTs, but that script still needs editing and with $0, after SQL 2012 we're dependent upon MS...

While MS is there, could we *please* have an _option_ to set the default "Save Results As" file type to tab-delimited _or_ csv, rather than the csv type we have to change every time...? It's VERY tedious when parallel running new vs. old to have to always change the file type... Same is true when needing to export for Excel consumption and cells contain commas...