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

AVEVA™ Historian

WHERE clause anomalies

  • Last UpdatedMar 19, 2025
  • 1 minute read

In some rare cases, the SQL Server query processor truncates the WHERE clause in an attempt to optimize the query. If you execute a query with a WHERE clause, but an error message is returned stating that no WHERE clause was received by the SQL Server, simply add another condition clause to the query.

For example, in the following query, the SQL Server query processor optimizes out the WHERE clause, because it is superfluous.

SELECT DateTime, Value, QualityDetail

FROM History

WHERE TagName LIKE '%'

A workaround is to add another condition clause. For example:

SELECT DateTime, Value, QualityDetail

FROM History

WHERE TagName LIKE '%'

AND wwRetrievalMode = 'delta'

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