VALUES clause

Specifies a list of values in an Insert Values statement to be generated at the specified time and inserted into the statement's destination.

Syntax

VALUES ( column_expression [, ...] ) [, ...]
Component

column_expression

An expression that evaluates to the same data type as the corresponding destination column. column_expression can contain constants, variables, operators, parentheses, scalar functions, and the COALESCE function.

Usage

VALUES is the second clause inside an Insert Values statement. This clause produces one or more rows, which the statement passes to its destination in the INSERT clause, at the times you specify in the OUTPUT clause. VALUES contains one or more row expressions, each of which is enclosed in parentheses and each of which generates a row that is published to the destination at the specified time. Lists of two or more row expressions are separated by commas.

Every row expression consists of one or more column expressions, each of which generates a value that corresponds to the appropriate column of the destination specified in the INSERT clause. Lists of two or more column expressions are separated by commas. The results of column expressions within a row expression are matched positionally with the stream schema or column name list in the INSERT clause (see INSERT Clause for more information).

Restrictions

See Also

Example

The following example produces two rows when the project first starts and at 18:00:00.1 every day. The first row consists of two columns: one containing the zero and the other the current timestamp, as generated by the NOW function. The second row consists of the value 1 in one column and the current timestamp in the second column. Both rows are published to the Flag and TimeMarker columns of .InitStream.

INSERT INTO InitStream (Flag, TimeMarker)
VALUES (0, Now()), (1, Now())
OUTPUT AT ( STARTUP, '18:00:00.1' );