To specify SQL Editor preferences

  1. Select Preferences > SQL Editor.



  2. Change the settings as appropriate in each section and then click Apply. the following options are available:
    • Enable the SQL parser. For performance reasons, you may want to enable the SQL parser only if a SQL file is smaller than the size you specify here.
    • Severity level for semantic validation problems. Choose a security level from this list. This option determines how semantic code errors are flagged in the editor and the Problems view.
    • The link to specify hyperlinks takes you to the Text Editors preference page.

      Clearing Enable SQL Parser disables many of the "smart" SQL editor features, including code formatting, auto completion, semantic validation, and hyperlinks. For better performance, you may disable the parser for files above a specified size.

See the following topics to configure other SQL Editor preferences. 

Specify Code Assist preferences

The Code Assist panel is used to specify configuration parameters that determine how code completion features in SQL Editor behave.

To specify Code Assist preferences

  1. Select Preferences > SQL Editor.



  2. In the Preferences dialog, expand SQL Editor, and then click Code Assist.

The following options are available on the Code Assist Preferences page:

  • Enable auto-activation. When selected enables code assist functionality with the Ctrl + Space command. If this option is selected, the code assist window automatically appears when you stop typing.
  • Auto-activation delay (ms). Specify the amount of time in milliseconds that the window automatically appears.
  • Auto activation triggers for SQL. Enter a trigger character or trigger characters. When you enter an activation trigger in the SQL Editor, you will see the code assist options available.
  • Fully qualify completions automatically. When selected, specifies if code completion results are returned specific (fully qualified), rather than the minimum required to identify the object.
  • Code assist color options. Specifies the color formatting of code completion proposals.

Select background or foreground options from the menu and modify them as appropriate.

Specify Code Formatter preferences

The Code Formatter pane provides configuration options for code formatting functionality in SQL Editor.

To specify Code Formatter preferences

  1. Select Preferences > SQL Editor.

     

  2. In the Preferences dialog, expand SQL Editor, and then click Code Formatter.

The panel provides a drop-down list of formatting profiles and a preview window that displays how each profile formats code.

  • Select a profile. From the list, choose the profile you want to view.
  • Click Show to view the details of the Profile. On the Show Profiles dialog that appears, you can edit the profile and save the changes.
  • Click New to define additional code formatting profiles.
  • Click Edit to modify existing profiles. You can modify how code characters appear in the interface and how SQL Editor determines line breaks.
  • Click Rename to change the name of an existing profile. The new name cannot be the same as another existing profile.

If you create a new profile with a name that already exists in the system, a prompt will appear asking you to change the name of the new code formatting template. 

Create and edit code formatting profiles

You can create your own code formatting profiles that define how your SQL code is formatted.

To create a code formatting profile

  1. Select Preferences > SQL Editor.
  2. In the Preferences dialog, expand SQL Editor, and then click Code Formatter.
  3. On the Code Formatter pane, click Show or New and a dialog similar to the following appears. 



  4. Make your changes, and then click Apply to preview your changes.
  5. Click OK to create the new profile or to exit the Show Profile dialog. 
  6. Use the preview pane to preview the changes you make to your code formatting preferences. Changes are not implemented until you click Apply or OK.

Specify Code Quality preferences

The Code Quality preferences allow you to specify the severity level for several categories of problems that result in inefficient or erroneous SQL.

To specify Code Quality preferences

  1. Select Preferences > SQL Editor.
  2. In the Preferences dialog, expand SQL Editor, then and click Code Quality.



  3. Change the severity levels by clicking the list next to the category, and then choosing the level. 
  4. Click Apply to save your changes.

Specify Results Viewer preferences

The Results Viewer pane provides configuration options that specify how the Results view displays or saves results.

To specify Results Viewer preferences

  1. Select Preferences > SQL Editor.
  2. In the Preferences dialog, expand SQL Editor, and then click Results Viewer.



  3. Make your preference changes, and then save your changes by clicking Apply. The following options are available:
    • Maximum number of result sets: If selected and the executed SQL returns more results sets than the maximum specified, result sets in excess of the maximum specified are not displayed.
    • Suppress execution messages: If selected and the SQL you execute returns informational messages, they are not displayed.
    • Show results in editor: Execution results can be either shown in the editor or sent to a file.
    • Grid refresh interval: Indicates the speed (in milliseconds) that the Results view refreshes.
    • Maximum result rows to sort: If the number of rows and results exceed this number, the column sorting in the result set is disabled.
    • Results format: These are the different formats that can be used to display the results in the editor.
    • Stripe the rows of the results table: Adds intermittent highlighted bars in the Results view.
    • Display results in separate tab in SQL Editor: Opens the Results view in a separate window on the Workbench.
    • Save results to file: Provides options that let you save the contents of the result sets to a file. You can also specify the file type, delimiter and text qualifier.

Specify SQL Templates preferences

The SQL Templates panel provides customization options for creating and modifying SQL code templates.

To specify SQL Templates preferences

  1. Select Preferences > SQL Editor.
  2. In the Preferences dialog, expand SQL Editor, and then click SQL Templates. The SQL Templates panel displays a list of all SQL code templates currently available. Additionally, when you select a template from the list, the Preview section displays the code block as it will appear when the template is selected in SQL Editor.



  3. Click the check box beside each template to specify whether it is included in the code assist check within SQL Editor. Use the buttons on the right-hand side of the panel to create, edit, or delete SQL templates, as needed.
    When you create or edit a template, the Edit SQL Template dialog appears. 



  4. Enter a Name, Description, and Pattern in the fields provided, and then click OK. If the template name doesn't match an existing SQL code template, your new template is added to the list, and will automatically be considered when the code assist function is executed in SQL Editor. 
  5. Select the Use Code Formatter check box to apply code formatting preferences to the specified template. For more information about setting code formatter preferences, see Specify Code Formatter Preferences.

Specify Syntax Coloring preferences

The Syntax Coloring panel provides configuration options that change the look and feel of code syntax in SQL Editor.

To specify Syntax Coloring preferences

  1. Select Preferences > SQL Editor.
  2. In the Preferences dialog, expand SQL Editor, and then click Syntax Coloring.



  3. Use the tree view provided in the Element window to select the comment type or code element you want to modify. Select the options to the right-hand side of the window to modify it. The Preview window shows a piece of sample code that updates according to the changes you made.


IDERA |  Products | Purchase | Support |  Community |  Resources |  About Us  | Legal