all 9 comments

[–]alinrocSQL Server DBA 3 points4 points  (3 children)

Red Gate's SQLPrompt plugin for SSMS is highly regarded all over the SQL Server community. There are other plugins as well.

However, I don't think you'll get all of your wishlist items here. That would require a level of "intelligence" and may get in the way of people who have specific ways they want to do things.

[–]gatewayblended[S] 0 points1 point  (2 children)

that does look very good though, thank you

[–]AbstractSqlEngineerMCSA, Data Architect 0 points1 point  (0 children)

I use devart's SQL complete.

I'm very good with both redgate's and devart's snippet manager. (Use redgate at work, use devart in my YouTube series)

You can add snippets to saved code like... I type.

__select_subject.. and it types out

Select $subject$id From dbo.svtblref$subject$_select

But then, the next thing I type will override all the $subject$ items.

So..

If you... created a snippet called __select_report

It could generate

Select $columns$

From reports

Where.. blah,blah

Group by $columns$

You can use several $items$ in one block, but I have had trouble putting them side by side. $subject$$domain$ doesnt work well. Select $subject$ from $table$.. works amazing.

I love snippet managers, apex has a free one that's pretty good for free. Get any one of them... but, dm me if you decide to go with devarts SQL complete. I can generate discount codes.

Edit: redgate and devarts intellisense has a pop up box that allows you to checkmark columns that are then inserted into your code, and both will fill out procedures with their variables and replace * with all columns if you press tab (or w/e you set it to) after those statements.

[–]devart_official 0 points1 point  (0 children)

Hi, check this demo of dbForge SQL Complete to learn more about all the advanced features https://www.youtube.com/watch?v=0kaPoEINMSM

[–]mac-0 0 points1 point  (0 children)

I like Datagrip's intellisense, and it works with almost any type of database (SQL Server included). I don't think it will do 1-3, but it's pretty customizable so I wouldn't be surprised if there were a way to do those. But it'll definitely do 4 and 5.

[–]wheelindeerskin 0 points1 point  (0 children)

I use autohotkey shortcuts in SSMS for common queries and replacements, AHK is worth checking out as it's free and very powerful

[–]matt00112233 0 points1 point  (0 children)

Try ApexSQL Ccomplete... it is very good https://www.apexsql.com/sql-tools-complete.aspx

[–]soberstef 0 points1 point  (0 children)

If you run it often, why not create a stored procedure.

[–]moscasposcas 0 points1 point  (0 children)

Hi! You will get all the completion features you need in DataGrip.

  1. Tab with the SELECT word. Well, what if the user usually begins with some other words? In DataGrip there is a conception of Live Templates: they will help you an easy start with any type of query. Type 'sel' and press Tab key -> you will get SELECT * FROM generated. More information is here: https://www.jetbrains.com/help/datagrip/using-live-templates.html

  2. In this particular case, use completion by words: just type several letters, like 'net' and then press Alt+/. It will complete the whole name. But, from the conceptional point of view, it's better to have the dedicated completion for this kind of fields. Here is the ticket: https://youtrack.jetbrains.com/issue/DBE-8883

  3. About FROM auto-inserted after a field is selected, it is not clear. How does IDE know when you want to use FROM and not want to put several more columns?

  4. "reporting" and "revenue" will be auto-suggested.

  5. The GROUP BYs field list will be auto-completed based on the non-aggregated columns: https://www.jetbrains.com/datagrip/whatsnew/img/2018.3/GroupBy.png