Reputation: 9399
I use SQL Server Management Studio. One of the time-saving features that helps me a lot they way you can set new keyboard shortcuts. I've set a combination of keys to execute sp_helptext
, so I can select the name of a stored procedure and see its definition on the results pane.
I am trying to use Visual Studio (2013 pro) now to work on my SQL code. I can't find any way to set new key combinations like I do in SSMS.
Is it possible to set a shortcut for sp_helptext
in VS? How can I do it?
Upvotes: 3
Views: 11423
Reputation: 2020
This Visual Studio Extension is the one you are looking for.
Added some extra commands for Visual Studio SQL editor under the menu "SQL", so you can do the same things as with SQL Server Management Studio. For example, select the table name, then press the shortcut key, it will run "exec sp_help tableName".
Crollan's SQL Server Management Studio addIn - Crollan SQL Auto Complete, has lots of other powerful features. One of them is to automatically find out the potential ways to join tables. The addIn can be found on
https://visualstudiogallery.msdn.microsoft.com/bf161b31-0826-4f07-905b-d5d09c1227bb or
Upvotes: 1
Reputation: 9399
In the end what worked was getting all the stored procedures text in .sql files in Visual Studio. This way, if I have a piece of C# code that looks anything like the example below:
SqlCommand command = new SqlCommand("SAMPLE_PROCEDURE", someConnection); // snip
I can select the name of the stored procedure (in this case, SAMPLE_PROCEDURE
), hit CTRL + ,
, and then the corresponding .sql file will automatically be opened in a new tab.
Upvotes: 1