Category: sql server tools
Markus Hopfenspirger on Wed, 02 Nov 2016 09:32:34
I'm using Management Studio now since Version 6.5. I love the Right Click Menü e.g. on a table where I can select Top 1000 Rows or Edit Top 200 Rows. And it is great that Management Studio can generate the Query for me.
But normally the first thing I change in this Query, is, that I remove the fields and replace them with * and than I apply a Where statement. In some other cases I build a join and so on.... Normally I always delete the Comment above the query....
So what about Templates at this place. Something like the Code Templates of Resharper where I can use placeholders and Management Studio is filling in the Values for the placeholder or the values wich can not be filled in automatically are filled in with suggestions in the editor.
E.g.: A simple usefully template would look like this:
Select * from #CLICKED_TABLENAME# Where #FIELDNAME# = #USER_ENTERS_A_VALUE#
- Management Studio can insert the CLICKED_TABLENAME from the Table the user did a right click.
- And in the Editor the FIELDNAME is highlighted and Intellicense displays a list of FieldNames for this Table.
- And after a Fieldname was selected (Return or with mouse) it jumps to the next placeholder ...
And this templates are showing up in the Right Click Menü under a Submenu... of a Table or View.
This would save me a lot of time. I normally use this function at least 20 Times a day in average and I'm a developer not a SQL Server Admin...
By the way! I think it was a good decision to separate Management Studio from SQL Server Setup!
Nice greetings from Germany,
Teige Gao on Thu, 03 Nov 2016 02:48:31
Based on your description, I think it can be a good feature which will make people more convenient, I recommend you submit a feature request to Microsoft at https://connect.microsoft.com/SQLServer. If the requirement is mentioned by customers for many times, the product team may consider to add this feature in the next SQL Server version.
Hilary Cotter on Thu, 03 Nov 2016 03:04:37
You know you can click on a table to select it and then drag it to a new query window and then you will have your table almost ready to query. Then expand your table and then expand the columns table. You can then drag a column or all columns (by dragging the columns folder) to the new query window and put it to the left or right of your previously dragged table name.
Not quite what you are looking for, but saves you having to type it out and saves your from making typos.
Markus Hopfenspirger on Thu, 03 Nov 2016 08:08:09
thanks for this hint, I did not know this. But in most simple cases this is slower than typing but I like dragging the Columns folder to the query window. This is great for generating a comma separated list of fields.
Markus Hopfenspirger on Thu, 03 Nov 2016 08:16:17
OK, here ist the Link for the Feature Request:
Teige Gao on Wed, 09 Nov 2016 02:13:43
I have voted this Feature Request, I think if some other people who have the same requirement will also vote it.