StateWideHistory (INSQL.Runtime.dbo.StateWideHistory)
- Last UpdatedMar 10, 2025
- 4 minute read
Contains one row for the amount of time one or more analog, discrete, or string tags have been in a particular state, thus providing a "wide" view of the data.
|
Column |
Data Type |
Description |
|---|---|---|
|
DateTime |
datetime2(7) NOT NULL |
The timestamp for the start of the time-in-state period. |
|
vValue |
sql_variant NULL |
The string representation of the state, the ordinal for state types that do not have a string representation, or NULL for a gap or "bad" value. |
|
Tag1 |
float NULL |
The name of a tag to query. |
|
Tag2 |
float NULL |
The name of a tag to query. |
|
ManyOtherTags |
float NULL |
A "placeholder" column for one or more tags in the wide table format. In the wide table format, tagnames are used as column names. The ManyOtherTags column is "duplicated" for as many tags as are specified in the database query. |
|
wwRowCount |
int NULL |
The number of rows to be returned for a specified time period. For cyclic retrieval, the rows are spaced evenly across the time period, and the default row count is 100 rows. For cyclic retrieval, the row count is applied for each tag in a query. This parameter has been deprecated; do not use. Use the wwCycleCount parameter instead. |
|
wwResolution |
int NULL |
The sampling rate, in milliseconds, for retrieving the data in cyclic mode. The system returns values stored over the requested time period at the interval specified by the resolution. For example, if you specify a 5000 ms resolution, the system queries for all data during the time period and then only returns those values that occur at each 5000 ms interval, starting with the start date and ending with the end date. |
|
wwRetrievalMode |
nvarchar(16) NULL |
Used to specify the time-in-state retrieval mode. The valid values are VALUESTATE and ROUNDTRIP. The default wwRetrievalMode is VALUESTATE. |
|
wwTimeDeadband |
int NULL |
The minimum time, in milliseconds, between returned values for a single tag. Applies only to delta retrieval. |
|
wwValueDeadband |
real NULL |
The percentage of full scale (range), in engineering units. Any value changes that are less than this percentage are not returned. Applies only to delta retrieval. The default is 0. |
|
wwTimeZone |
nvarchar(50) NULL |
Used to specify the time zone for retrieval. By default, the retrieval subsystem converts the UTC (Universal Time Coordinated) timestamps for the stored data to the local time of the AVEVA Historian computer, including adjustments for daylight savings time. To keep the timestamps in UTC, set the value of wwTimeZone to UTC. To convert the timestamps to a client computer's time zone, set this parameter to the appropriate time zone text key from the TimeZone table. |
|
wwVersion |
nvarchar(30) NULL |
If the original data values have been modified in the database, use this column to specify which version of the stored data is to be retrieved. Valid values are: ORIGINAL or LATEST. If no parameter is specified, the latest version of the data is retrieved by default. Modification is indicated by the QualityDetail. |
|
wwCycleCount |
int NULL |
The number of retrieval cycles (sub-intervals) for the specified time period. The cycles will be spaced evenly across the time period. For example, if you specify a cycle count of four, the time period will be divided into four even cycles, and one or more values (depending on the retrieval mode) will be returned per cycle. |
|
wwTimeStampRule |
nvarchar(20) NULL |
Used to specify whether cyclic results are timestamped at the beginning of the cycle or at the end of the cycle. Valid values are START and END. If no timestamp rule is specified in the query, then retrieval uses the setting of the TimeStampRule system parameter. |
|
wwQualityRule |
nvarchar(20) NULL |
Used to specify whether values with certain characteristics are explicitly excluded from consideration by data retrieval. This parameter will override the setting of the QualityRule system parameter. Valid values are GOOD, EXTENDED, or OPTIMISTIC. A quality rule of GOOD means that data values with doubtful (64) OPC quality will not be used in the retrieval calculations and will be ignored. Values with bad QualityDetail indicate gaps in the data. A quality rule of EXTENDED means that data values with both good and doubtful OPC quality will be used in the retrieval calculations. Values with bad QualityDetail indicate gaps in the data. A quality rule of OPTIMISTIC means that calculations that include some good and some NULL values will not cause the overall calculations to return NULL. You can apply wwQualityRule to all retrieval modes. |
|
wwStateCalc |
nvarchar(20) NULL |
Used to indicate the type of calculation to return in the StateTime column for the "value state" retrieval mode. Valid values are: MINIMUM, MAXIMUM, AVERAGE, TOTAL, CONTAINED, or PERCENT. You can also use the shortened versions: MIN, MAX, AVG, or SUM. The default for this column is TOTAL. |
|
wwParameters |
nvarchar(128) NULL |
Used for additional parameters that can be specified. By default, the value of this parameter is an empty string. |
|
StartDateTime |
datetime2(7) NOT NULL |
Start time of the retrieval cycle for which this row is returned. |
|
wwFilter |
nvarchar(512) NOT NULL |
The name of the filter. Filters are specified as C-like functions and parentheses are always required, even when the filter does not override the default parameters (no parameters are passed). Filter values are NoFilter, ToDiscrete(), SigmaLimit(), and SnapTo(). The default value is NoFilter. If the query does not specify the wwFilter element at all, or if its default value is not overridden, then no filter is applied. |
|
wwMaxStates |
int NULL |
For internal use only. |