ihQuerySettings Table
The ihQuerySettings table contains the current session settings. These settings are applied to all queries you make in a session, unless overridden with a WHERE
clause. This table displays settings stored in the provider, and has nothing to do with the data stored in the archives.
The ihQuerySettings table provides a convenient way to display all your session settings. You cannot, however, write or update settings in this table. This table contains only one row with the settings for the current session. The only way to change these parameters is by using the SET
statement.
Column Name | Data Type | Description |
---|---|---|
StartTime | VT_DBTimeStamp | The start time of the query. This represents the earliest timestamp for any tag contained in the query. If no |
EndTime | VT_DBTimeStamp | The end time of the query. This represents the latest timestamp for any tag contained in the query. If no |
SamplingMode | VT_BSTR | The mode of sampling data from the archive:
Calculated is the default setting. |
Direction | VT_BSTR | The direction (Forward or Backward from the start time) of data sampling from the archive. The default value is Forward . |
NumberOfSamples | VT_I4 | Number of samples to retrieve from the archive. Samples will be evenly spaced within the specified start and end times defined for most sampling modes. For the Note: The NumberofSamples and IntervalMilliseconds columns are mutually exclusive. If NumberofSamples is used, IntervalMilliseconds is not used. |
IntervalMilliseconds | VT_I4 | For non-raw sampled data, this column represents a positive integer for the time interval (in milliseconds) between returned samples. Note: The NumberofSamples and IntervalMilliseconds columns are mutually exclusive. If IntervalMilliseconds is used, NumberofSamples is not used. |
CalculationMode | VT_BSTR | This column applies only if the SamplingMode is set to Calculated . It represents the type of calculation to perform on archive data:
Average . |
FilterTag | VT_BSTR | Tagname used to define the filter, if specified. Only a single tag can be specified. Wildcards are not supported. |
FilterMode | VT_BSTR | The type of time filter:
This value defines how time periods before and after transitions in the filter condition should be handled. For example,AfterTime indicates that the filter condition should be True starting at the timestamp of the archive value that triggered the True condition and ending at the timestamp of the archive value that triggered the False condition. |
FilterComparisonMode | VT_BSTR | The type of comparison to be made on the filter comparison value:
FilterTag value should be compared to the FilterValue value to establish the state of the filter condition. If FilterTag and FilterComparisonValue values are specified, time periods are filtered from the results where the filter condition is False . |
FilterValue | VT_BSTR | The value with which to compare the FilterTag value to determine appropriate filter times. |
FilterExpression | VT_BSTR | An expression which includes one or more filter conditions. The type of conditions used are:
FilterTag , FilterComparisonMode , and FilterValue columns. While using FilterExpression , the expression is passed within single quotes. For complex expressions, you write the conditions within parentheses. There is no maximum length for this value, but if called using OLE DB or Excel, these tools may have their own limitations. |
TimeZone | VT_BSTR | The type of time zone used:
|
DaylightSavingTime | VT_BOOL | Indicates whether Daylight Saving Time logic should be applied to timestamps. |
RowCount | VT_I4 | Indicates the maximum number of rows that can be returned. A value of 0 indicates that there is no limit to the number of rows returned.If the query result contains more rows than the |
AlarmType | VT_BSTR | Indicates the alarm type:
|
ihQuerySettings Examples
Example SQL statements for the ihQuerySettings table are outlined in the following examples.
Example 1: Show All Settings for the Current Session
SELECT * FROM ihquerysettings
Example 2: Show the Selected Session Settings
SELECT starttime, endtime FROM ihquerysettings