Red-gate sql query intellisense tool




















This is very good functionality. There are naturally times when I need to support our clients, some of whom are encrypting the code of their routines. Sometimes I need to look at some of their procedure code, and I really hate seeing this message:.

Secondly, it wastes time decrypting objects when SQL Server needs to run the procedure. There are admittedly many pieces of software that can break the encryption used here, but I was still surprised when I wrote an exec to an encrypted proc, and SQL Prompt immediately displayed the all the code! Here you can see my short cuts:. The improvement here would be for SQL Prompt to use a wildcard in conjunction with this feature.

Well here is something that I really want to get some time to write a C Add-In for. I want to be able to drill down in the ResultGrid using a selected value. I think if I demonstrate this with images, it will be easier for you to understand what I mean. Take the following situation:. You could just check if a foreign key exists using this column and then generate the query, displaying something like this:.

In that case, we could suggest an index using the column, or check if an index exists to automatically enable that option.

We could even include a button to stop the query and turn this functionality off by default. Just think about it, and we can talk about it in the comments below. If would be great if we could get the related foreign keys displayed as a suggestion to the DROP command:.

When we write code using a function, all the columns are suggested, but I think would be much better if we only saw the columns which have the right datatype, respective to our query. For instance:. Help for older versions available. Page last updated 08 September The suggestions box pops up to display items based on what you type in your query editor. The suggestions box is displayed automatically when you type in a query window.

As you type, the suggestions are filtered to match the typed characters. To insert the currently highlighted suggestion, press Tab or Enter, or any of the defined insertion keys. To close the suggestions box without inserting anything, press the Esc key. If nothing is selected in the suggestions box, you can also press the Enter key to close it. As of SQL Prompt Otherwise, it will sort using a combination of object type and alphabetic sorting.

In some cases the suggestions box might be covering up the code you want to see. You can make the suggestions box semi-transparent for as long as you need by pressing and holding the Ctrl key. The type of suggestions displayed will depend on where in the query you display the suggestions box. The highlighting happens after you type a letter and the result is a syntax pair.

The delimiter pair remains highlighted until you move the cursor. You can turn the highlighting back on by deleting and retyping any letter in either member of the pair. Snippets are strangely parallel to the traditional templates in SSMS. Templates are, however carefully maintained by Microsoft with templates containing code for all the new features, whereas snippets only have the basics.

The snippets are held in a directory, which be default is:. There are subdirectories for each category of snippet, as displayed in the Snippet Manger menu. The directory can be shared. Each snippet is an individual XML file and are currently two types of snippet:. You invoke a snippet by right-clicking in a query pane and choosing Insert Snippet… from the context menu.

The Declarations section will allow you to declare strings called literals which you can modify after inserting the snippet, so that, if the same literal appears in several places, it gets modifies in all occurrences.

You can then select an item from the list or type a replacement of your choice. It is possible to use templates as snippets and you can still invoke the form to fill in the template parameters, after pasting in the snippet. There are two special values in a snippet:.

SQL Prompt snippets work in a similar way but offers a bit more versatility, allowing various replacement points, or placeholders, within the snippet code.

They are also easier to create and adapt. The Query Designer will open. Select the SQL and then right-click the selection to bring up the context menu. It allows a lot more control over the formatting options and allows users and teams to maintain individual and house styles, and switch between them easily. This happens automatically when IntelliSense is switched on although you can disable it individually, as described earlier. If you hover your mouse over the underlining, a tooltip will reveal the syntax error.

It is only an indication but is extremely useful, nonetheless. It allows you to collapse sections of code if you are editing long screeds of SQL in the same query window.

What you consider to be the best bits will vary from person to person. The outlining statements feature is useful. We start by just using SQL Prompt. OK, it is Pubs again. What tables has he specified in a query recently?



0コメント

  • 1000 / 1000