Setting Query Options - 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

Setting Query Options

Use the following procedure to control queries by setting options on the Query tab.

Note: The SQL Assistant option Allow use of ODBC SQL Extensions in queries no longer exists. Clear the ODBC Data Source option Disable Parsing to allow the use of ODBC SQL Extensions.

1 Select Tools > Options.

2 Select the Query tab.

Table 12 explains each option in the Query tab.

 

Table 12: The Query Tab in the Options Dialog Box. 

Option

Description

Close the Answerset window before submitting a new query

The default value is selected. When selected, all Answerset windows that are not marked as Do not Close are closed before running a new query.

Disable parsing for Queries larger than

The default is 900 KB. If a query is larger than this size when loaded from a file, or from History, then all parsing will be switched off. The query will display plain text without any highlighting, uppercasing, outlining, or code completion functionality.

Disconnect from database when a query ends

The default value is cleared. When selected, this option starts and stops the connection to the data source with each query.

Note: When using this mode, all transactions must be committed or rolled back within the query that started them.

Limit parsing for Queries larger than

The default is 200 KB. If a query is larger than this size when loaded from a file, or from History, a simpler language definition will be used in order to improve performance. In this case only the more common keywords and functions will be highlighted, and automatic uppercasing will not occur.

Minimize SQL Assistant while a query is running

The default is cleared. When selected, Teradata SQL Assistant minimizes when a query runs.

Prompt for a note before running a query

The default is cleared. When selected, Teradata SQL Assistant displays a dialog box to enter notes whenever a query is submitted. Also, on the toolbar click (you can toggle this option on or off).

To add a note after the query has completed, double-click the note cell, or click the cell and press Enter. The Query Note dialog box opens.

Provide audible notification when a query ends

The default is cleared. When selected, Teradata SQL Assistant makes a sound when a query is complete. The sound also occurs if the query times out, the number of rows exceeds the output limit, or the query is canceled.

This option is also available from the toolbar by clicking .

Stop query execution if an SQL error occurs

The default is selected. When selected, queries are stopped if an error occurs even if the query contains additional statements that have not yet been executed.

If a query with conditional logic based on the ERRORCODE command is used, clear this option. If this option remains selected, Teradata SQLA stops processing the query before it attempts to evaluate the conditional logic.

Queries with conditional logic based on ERRORCODE and ending with an EXIT command are reported as successful if the return code is zero.

Submit only the selected query text when highlighted

The default is cleared. This means even if part of the query is highlighted, the entire query is executed when submitted.

Allow use of Named Parameters in queries.

The default is selected. This setting allows the use of Named Parameter substitution in queries.

Prompt to save the Query Log when a Query ends

The default is cleared. When selected, Teradata SQL Assistant displays a dialog box that allows the Query Log to be saved after a multi-statement query is executed.

Prompt to save queries that have been changed, but not run, before closing

The default is selected. When selected, Teradata SQL Assistant displays a dialog box to save the Query to either a file or to the History database before closing the Query window or closing Teradata SQL Assistant.

A prompt to save the query only displays if changes were made to the query since opening a file, saving to a file, executing the query, copying a query from the History window by clicking on the SQL, or using the Clear Query button.