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

Fernhill SCADA places a shortcut to the SQL Test Tool on the Windows Start Menu. Use this table to find the shortcut based on the Version of Windows you are using:

Windows VersionShortcut Location
Windows 11
  1. Open the Start menu.
  2. Click All apps
  3. Scroll down and expand Fernhill SCADA Operator Tools.
Windows 10
Windows Server 2022
Windows Server 2019
Windows Server 2016
  1. Open the Start menu.
  2. Scroll down and expand Fernhill SCADA Operator Tools.
Windows 8
Windows Server 2012
  1. Open the Start screen.
  2. Click the down arrow.
  3. Scroll right until you see the section Fernhill SCADA Operator Tools
Windows 7
Windows Server 2008
  1. Click the Start button.
  2. Select All Programs.
  3. Expand the folder Fernhill SCADA Operator Tools.

To provide more convenient access to the SQL Test Tool, use one or more of these methods:

Start the SQL Test Tool from the Notification Icon

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

  1. Right-click 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 IconClear the SQL editor window
File Open IconLoad the SQL editor window from a file
File Save IconSave the contents of the SQL editor window to a file
Cut IconDelete text; automatically saving the deleted text to the clipboard
Copy IconCopy the current text selection to the clipboard
Paste IconPaste text from the clipboard into the SQL editor window
Undo IconUndo the last editor action
Redo IconRedo the last editor action
Connect to Server IconConnect the SQL Test Tool to the locally running Fernhill SCADA
Stop IconStop execution of the current query
Refresh IconExecute the current query once
Go IconStart execution of the current query continuously
Ruler IconToggle the display of row numbers
Magnifying glass iconDisplay 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 improve 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

To learn how to solve 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.