TVD Connector - SQL Expression Dialog

This dialog is a simplified version of the standard Innovyze SQL dialog and it enables you build an SQL expression for a TVD connector.

The expression can be checked using the Test button in the dialog. If the expression is valid, the results from evaluating the expression are displayed; but if not, a suitable warning will be issued.

A saved expression is automatically evaluated during an appropriate Run.

The SQL Expression dialog is displayed when you click in the Output expression field in the TVD Connector Grid Window of the Polygons Grid or a TVD Connector's Property Sheet.

ClosedShow me

If you are familiar with SQL syntax, you can type in an expression manually (using the Field drop-down list, if required, to insert the fields you want to include in the expression). The supported SQL operators and functions, which can be used in an expression, are listed below.

Alternatively, click Builder >> . This displays a set of buttons representing the operators that you can include in the expression.



Object Type

A read-only field displaying the type of object to which this query will apply. This is always a TVD connector.

Field Type

A read-only field which shows the fields related to the TVD connector in the Field dropdown list.


A list of database fields applicable to the TVD connector can be selected from the drop-down list.

This list includes all the fields that comprise the TVD connector (as displayed in its grid window or property sheet) as well as the following fields:

  • oid (Object ID) - returns the primary key of the object. This can be used to get multi-part IDs for objects such as pipes that include link suffix as part of their ID.
  • otype (Object Type) - used to return the object type.
  • rank (Rank) - used to return the rank, (position), of the object as it appears in an ordered list. See SQL in InfoWorks ICM for further information.
  • run.origin – used to return the run origin as a date/time.


Currently, only fields which can return a numerical value are included in the evaluation of an expression.

Selecting a field from the list inserts the field into the expression.

Display precision

Select the number of decimal places to be shown when displaying the results of the SQL expression.


Click the Builder >> button to display a set of buttons representing the operators that can be included in the expression. Click the Finish << button to close the builder.


Tests that the expression contains valid SQL functions and operators. See Testing the expression for further information.


Saves the current expression. The saved expression is displayed in the Output expression field in the TVD Connector's property sheet or grid window.


Closes the SQL Expression dialog without saving the expression.

Supported SQL syntax for TVD expressions

TVD expressions are used to create and manipulate whole time series of numeric (or null) data. All time series exist in a common time domain defined by start and end times (usually based on the run start and end time) and each time series has an interpolation rule (linear or step/extend) that determines how values can be interpolated at times that fall between the individual data points in the series. See the technical paper Theory of time series expressions for more about how time series are represented and manipulated.

Any of the standard set of arithmetic, logical or comparison operators, unary or binary, may be applied to a time series data value or pair of values. All of the standard SQL functions that take one or more numeric arguments and that yield a numeric result can also be used with time series data arguments and will yield a time series data value as a result. See the topic SQL Syntax for more details.

Specialised functions for use with time series data values

The following functions can be used only to create or manipulate time series data values. They cannot be used in "normal" SQL expressions and queries. These functions are described in more detail in the technical paper Theory of time series expressions.

The following functions and operators can be used in TVD expressions:

Adding SQL Expressions to TVD Connectors

TVD Connector Data Fields

TVD Connector Data Fields (SWMM)

TVD Connectors

SQL Syntax

SQL Dialog

Theory of time series expressions