Customizing Code Completion Lists - SQL Assistant

Teradata SQL Assistant for Microsoft Windows User Guide

Product
SQL Assistant
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2430
lifecycle
previous
Product Category
Teradata Tools and Utilities

Customizing Code Completion Lists

The list of built-in functions that appear in the code completion drop down lists is vendor specific. Currently only four sets of lists are provided:

  • Teradata
  • Base
  • ANSI
  • ANSI2008
  • The ANSI file is used when View > ANSI SQL is selected and you are connected to Teradata. The Base and ANSI2008 files are used when you are connected to a non-Teradata Database.

    These lists are defined in files named TeradataXX.mbr, BaseXX.mbr and so on. Where XX is AF for aggregate functions, NF for regular functions, TF for table functions, or TO for table operators. The .mbr files are located in \Users\<user>\AppData\Roaming\Teradata\SQL Assistant.

    If you regularly work with another database such as Oracle, you can create your own lists specifically for use with that database type (for example, OracleNF.mbr and OracleAF.mbr).

    You can also edit the existing .mbr files to remove unused functions or add your own User Defined Functions (UDFs). These are simple XML text files containing a single element type with 4 attributes:

  • name is the text that appears in the dropdown list.
  • help is an optional string that appears in a tooltip when the list item is selected.
  • hasParen is an optional attribute that should be set to “false” if no parens are required.
  • db is an optional attribute that can be specified to add a database prefix to the name.
  • Note: Certain characters must use their html equivalent: > [&gt;] < [&lt;] and “ [&quot;]

    The following special characters are used within the help text:

  • ~ Must immediately precede the function name
  • ! Must immediately follow the function name
  • @ Is used to insert a line break for the Quick-Info tool tip text
  • @@ Can be used after the final close paren at the end of the parameter list. This is intended for complex functions with many parameters. It will activate the functionality to insert the parameter template into the Query when you double click the function name.