Combined SET and SELECT Statements

The Historian OLE DB provider allows you to execute one SELECT statement and one SET statement per query. Enter a space or a line break to indicate the end of a statement in a query. Do not use a semicolon (;) at the end of the line or statement, as it is not necessary with the Historian OLE DB provider.

Example 1: Use SET and SELECT Statements on the Same Line

SET samplingmode=interpolated SELECT * FROM ihquerysettings

Example 2: Use SET and SELECT Statements on Different Lines

SET samplingmode=calculated, starttime=yesterday, endtime=today
SELECT * FROM ihquerysettings