Supported SET Statement Syntax
The use of SET
statements is not mandatory because you can also
specify query parameters in a WHERE
clause. However,
SET
statements can make your queries more readable. By using
SET
statements, you can save time by simplifying
SELECT
queries, because you do not have to retype query
parameters each time you issue a new SELECT
statement. The
SET
parameters persist for the entire session.
With a SET
statement, you can define various defaults for your
queries to use, such as:
- The start date and time of the selected data
- The end date and time
- The calculation mode
- The number of rows returned
- The data sampling mode
For more information, refer to ihQuerySettings Table.
SET IntervalMilliseconds = 7000
Correct SET Without Comma to Separate Thousands Place
Multiple SET
statements in the same command are not supported.
Combine multiple variables in the same SET
statement.
SET starttime=yesterday-10d, endtime=today, samplingmode=interpolated
SET starttime=yesterday-10d
SET endtime=today
SET samplingmode=interpolated