SQL Test Tool

Help Contents

Introduction

The SQL Test Tool allows you to:

The results of the query are displayed in a table:

SQL Test Tool showing all tags.

Starting the SQL Test Tool

From the Windows Start Menu

Choose the appropriate method to start the SQL Test Tool based on the version of Windows you are using:

Windows VersionMethod
Windows 10
Windows Server 2016
  1. Open the Start menu,
  2. Scroll down and expand Fernhill SCADA,
  3. Click on SQL Test Tool.
Windows 8
Windows Server 2012
  1. Open the Start screen,
  2. Click on SQL Test Tool.
Windows 7
Windows Server 2008
Windows Vista
  1. Clicking on the Start button,
  2. Select All Programs,
  3. Expand the folder Fernhill SCADA,
  4. Click on SQL Test Tool.

From the Notification Icon

You can also start the SQL Test Tool from the Fernhill SCADA Notification Icon:

  1. Right click on the Fernhill SCADA Notification Icon Notification icon running,
  2. Expand the View menu,
  3. Select any one of the options.

SQL Test Tool Toolbar

The toolbar provides quick access to these functions:

IconDescription
File New IconClears the SQL editor window
File Open IconLoads the SQL editor window from a file
File Save IconSaves the contents of the SQL editor window to a file
Cut IconDeletes text; automatically saving the deleted text to the clipboard
Copy IconCopies the current text selection to the clipboard
Paste IconPastes text from the clipboard into the SQL editor window
Undo IconUndoes the last editor action
Redo IconRedoes the last editor action
Connect to Server IconConnects SQL Test Tool to the locally running Fernhill SCADA
Stop IconStops execution of the current query
Refresh IconExecutes the current query once
Go IconStarts execution of the current query continuously
Ruler IconToggles the display of row numbers
Magnifying glass iconDisplays the execution plan for the current query

Selecting a Predefined Query

Fernhill SCADA defines a number of predefined queries. The predefined queries provide a convenient shortcut to explore the Fernhill SCADA Database. To select a predefined query:

  1. From the menu select File.
  2. Select Open Query.
  3. Select the query from the list.

Exploring the Fernhill SCADA Database Schema

The Fernhill SCADA database contains database schema tables. Database schema tables provide metadata about the tables in the Fernhill SCADA Database. To select a schema table:

  1. From the menu select File.
  2. Select Open Schema.
  3. Select a table from the list.

Color and Menus

The result of an SQL SELECT statement is displayed in the output pane of the SQL Test Tool. You can use column alias strings to the enhance the appearance of the result. For example:

See Column Aliases in the SQL Test Tool for information on how to do this.

Editing SQL Queries

The bottom pane in the SQL Test Tool is a text editor. The text editor allows you to:

SQL Text editor.

Once you begin typing in the SQL Editor Window, the query stops automatic execution. When you have finished your edits, press the Go Icon button to restart automatic execution.

For the commands and shortcuts supported by the SQL text editor see Text Editor. For information about the SQL Query language supported by Fernhill SCADA see Fernhill SCADA Structured Query Language (SQL).

Highlighting Syntax Errors

Syntax and other types of error are automatically highlighted using a red underline. If you position the mouse near an error, a tooltip displays the cause of the error:

SQL Text editor showing an error.

Further Information

Diagnosing Connection Problems

If you are having problems connecting to a Fernhill SCADA Server.

Fernhill SCADA

To learn about the tools in Fernhill SCADA.

Column Aliases in the SQL Test Tool

To learn how column alias values can change row colors and associate a context menu with rows.

Text Editor

To learn about the commands and shortcuts supported by the text editor.

Fernhill SCADA Structured Query Language (SQL)

To learn about the structured query language (SQL) supported by Fernhill SCADA.

Glossary

For the meaning of terms used in Fernhill SCADA.