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

AVEVA™ Historian

Use an inner remote join

  • Last UpdatedMar 19, 2025
  • 1 minute read

Instead of using " … WHERE TagName IN (SELECT TagName … ) ", it is more efficient to use INNER REMOTE JOIN syntax.

In general, use the following pattern for INNER REMOTE JOIN queries against the historian:

<SQLServerTable> INNER REMOTE JOIN <HistorianExtensionTable>

This query returns data from the history table, based on a string tag that you filter for from the StringTag table:

SELECT DateTime, T.TagName, vValue, Quality, QualityDetail

FROM StringTag T inner remote join History H

ON T.TagName = H.TagName

WHERE T.MaxLength = 64

AND DateTime >='2002-03-10 12:00:00.000'

AND DateTime <='2002-03-10 16:40:00.000'

AND wwRetrievalMode = 'Delta'

This query returns data from the history table, based on a discrete tag that you filter for from the Tag table:

SELECT DateTime, T.TagName, vValue, Quality, QualityDetail

FROM Tag T inner remote join History H

ON T.TagName = H.TagName

WHERE T.TagType = 2

AND T.Description like 'Discrete%'

AND DateTime >='2002-03-10 12:00:00.000'

AND DateTime <='2002-03-10 16:40:00.000'

AND wwRetrievalMode = 'Delta'

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