Jessejames106
Jessejames106

Reputation: 13

Store the output from SSMS query/script for SSMS Add in

I've created an SSMS Add in (using Visual Studio 2010 (C#)) that stores the SQL script that has been executed to a text file on the local machine. I want to do the same with the query output but can't find any resources that cover this. Can anyone shed some light on how this would be done?.

Upvotes: 1

Views: 113

Answers (1)

beercohol
beercohol

Reputation: 2587

Have a look at the source for T-SQL Flex, that's an open source add-in for SSMS that exports query results to Excel - I'm sure there would be some useful tips in there!

https://github.com/nycdotnet/TSqlFlex/releases

Note that it uses Redgate's SIP add-in framework, which may or may not be compatible with your aims.

Author's blog is here: http://nycdotnet.blogspot.co.uk/2014/09/new-add-on-for-ssms-t-sql-flex.html

I'm not in any way affiliated with this, I just recently downloaded it and found it useful.

Upvotes: 3

Related Questions