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

AVEVA™ Historian

Making and querying annotations

  • Last UpdatedMar 19, 2025
  • 1 minute read

The following query creates an annotation for the specified tag. The annotation is made in response to a pump turning off. Then, the annotations for a particular tag are returned.

DECLARE @@UserKey INT

SELECT @@UserKey = UserKey

FROM UserDetail

WHERE UserName = 'wwAdmin'

INSERT INTO Annotation (TagName, UserKey, DateTime, Content)

VALUES ('ReactLevel', @@UserKey, GetDate(), 'The Pump is off')

SELECT DateTime, TagName, Content

FROM Annotation

WHERE Annotation.TagName = 'ReactLevel'

AND DateTime > '27 Feb 01'

AND DateTime <= GetDate()

The results are:

DateTime

TagName

Content

2001-02-28 19:18:00.000

ReactLevel

The Pump is off

(1 row(s) affected)

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