ApexSQL Complete – Code completion

This video shows how to use ApexSQL Complete options to manage the auto-complete hint list and use the auto-complete feature to speed up coding.

Transcript

Hello, and welcome to this video presentation in which we’ll describe how to use ApexSQL Complete options to manage the auto-complete hint-list and use the auto-complete feature to speed up SQL coding.

To enable the Auto-complete feature, navigate to the ApexSQL Complete menu, and click the Enable auto-complete command:

https://knowledgebase.apexsql.com/wp-content/uploads/2015/08/1-1.png

Once enabled, the hint-list is initiated upon typing, offering a hint to complete a keyword, SQL fragment, or even entire SQL statement.

Prior to the first appearance, the hint-list loads SQL database objects based on one of the following:

The current database connection:

https://knowledgebase.apexsql.com/wp-content/uploads/2015/08/2.png

Database specified in the use statement:

https://knowledgebase.apexsql.com/wp-content/uploads/2015/08/3.png

Since the add-in loads hints for the specified database just once (on the first hint-list appearance), it is recommended to wait for the add-in to finish loading. After the hints are loaded, they will not be loaded again, until the host application is restarted.

The hint-list offers context sensitive hints, and provides possible solutions based on the content of the current query. As an example, if the use statement is entered, the first hints in the hint-list will be available databases from the server:

The hint-list offers the drill down to the column level:

In cases where a quick overview of current SQL code is needed, such as when working with large scripts, the hint-list can be set as transparent and it will no longer obscure the underlying SQL. To invoke hint list transparency, hit the Ctrl key:

https://knowledgebase.apexsql.com/wp-content/uploads/2015/08/7.png

Hover over an object to highlight. An Object script box will appear showing the T-SQL script for the selected object:

https://knowledgebase.apexsql.com/wp-content/uploads/2015/08/8.png

ApexSQL Complete can insert full insert/update statement for the chosen database object:

Also, ApexSQL Complete can script out stored procedures, functions, triggers, views as an alter statement:

Let’s paste some code.

ApexSQL Complete is aware of the content from the current query. This means that each object that has a create statement, in the current query will be in the hint-list (no matter if an object is created or not) and will be green:

Now, you can create different queries against these tables, as we do with tables that have already been created in the database:

C:\Users\ZivkoPC\AppData\Local\Temp\SNAGHTML28db780.PNG

Please note, if we execute these statement before we create these tables the following error will occur:

Let’s execute these statement and open the new query window.

As you can see newly created tables are not present in the list.

Each time a new object is created the cache needs to be refreshed, in order for ApexSQL Complete to detect newly created object, and offer it in the hint-list.

ApexSQL Complete has options to auto-complete closing characters such as parenthesis, quotation marks, etc. These auto-completions can be enabled from the ApexSQL Complete options, in the Closing characters sections, under the Inserts tab:

https://knowledgebase.apexsql.com/wp-content/uploads/2015/08/9.png

Thanks for watching. For more information, please visit apexsql.com