Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

Quality rule - query 1

  • Last UpdatedFeb 07, 2025
  • 1 minute read

If you include the wwQualityRule column in a SELECT statement, it will show which quality rule was used for the individual row, if applicable.

You can combine OPC qualities in a query. For example, if you combine a mixture of good OPC qualities (such as 192 to 219), a good OPC quality (192) will be returned as a combined result.

SELECT TagName, DateTime, Value, QualityDetail, OPCQuality, wwRetrievalMode

FROM History

WHERE TagName = 'I0R5'

AND DateTime >= '2009-09-12 00:20'

AND DateTime <= '2009-09-12 00:40'

AND wwResolution = 10000

AND wwRetrievalMode = 'Avg'

If you run this query against the following sample data:

Tagname

DateTime

Resolution

QualityDetail

I0R5

2009-09-12 00:07

2

193

I0R5

2009-09-12 00:14

3

195

I0R5

2009-09-12 00:22

0

196

I0R5

2009-09-12 00:25

1

199

I0R5

2009-09-12 00:27

0

200

I0R5

2009-09-12 00:29

2

207

I0R5

2009-09-12 00:33

3

215

I0R5

2009-09-12 00:36

0

216

I0R5

2009-09-12 00:39

1

219

The results are:

Tagname

DateTime

Value

QualityDetail

OPCQuality

wwRetrievalMode

I0R5

2009-09-12 00:20

2.6

192

192

AVERAGE

I0R5

2009-09-12 00:30

1.0

192

192

AVERAGE

I0R5

2009-09-12 00:40

1.6

192

192

AVERAGE

TitleResults for “How to create a CRG?”Also Available in