Perform Query Testing - System Emulation Tool

Teradata System Emulation Tool User Guide

Product
System Emulation Tool
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2492
lifecycle
previous
Product Category
Teradata Tools and Utilities

Perform Query Testing

Use Teradata SET to execute SQL statements, using either Teradata SQL Assistant or the Execute SQL main window, to test queries before using them.

To set the query tool interface

1 From the main window, click Tools > Options.

The Options dialog box appears with the Customize tab selected by default.

2 Do one of the following:

  • Select the Use SQL Assistant rather than the Execute SQL window with ODBC connectivity check box to use Teradata SQL Assistant instead of Execute SQL as the query editor when connected to Teradata Database with ODBC connectivity.
  • Clear the Use SQL Assistant rather than the Execute SQL window check box to use the Execute SQL window.
  • Note: When using a CLIv2 connection, Execute SQL is used regardless of how this option is set.

    3 Click Apply.

    4 Click OK to close the Options dialog box.

    To test a query

    1 From the main window, click .

    Depending on how the query tool interface is set up and the connection mode, either Teradata SQL Assistant or the Execute SQL main window opens. See the procedure “To set the query tool interface”on page 124.

    2 [Optional] If using Teradata SQL Assistant, refer to Teradata SQL Assistant for Microsoft Windows User Guide B035-2430.

    3 [Optional] If using the Execute SQL main window, do one of the following:

  • Test a new query. Go to step 4.
  • Test an existing query. Go to step 5.
  • 4 [Optional] Test a new query:

    a Do one of the following:

  • Type the query to be tested in the Untitled window, which then becomes the Query window.
  • If queries exist in the History window, click the cell under the Query column to select one.
  • The query appears in the Query window.

    b Click .

    The results appear in the status bar at the bottom of the window.

    5 [Optional] Test an existing query:

    a Click .

    A Windows Explorer window opens.

    b Navigate to the query to be tested.

    c Click Open.

    The query appears in the Query window.

    d Remove heading information so just the query text exists.

    e Click .

    The results appear in the status bar at the bottom of the window.

    Input USING Values

    When a query containing the USING clause is submitted in the execute SQL window, the Input using values screen displays. See Figure 12 on page 126.

    Figure 12: Input USING Values

    1 The Using Query display box shows the query containing the USING clause.

    2 The Using Variables display box shows the values for the Name and Datatype variables.

    3 For the Value variable, enter the data values in the Value column.

    4 Click OK or Cancel:

  • Click OK to pass the variable data to the query during execution.
  • Click Cancel to prevent passing variable data to the query.