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

AVEVA™ Operations Management Interface

SQLData object runtime query string

  • Last UpdatedJul 19, 2024
  • 1 minute read

The DBToAttrCmd, DBToTempCmd, and RecordDeleteCmd attributes execute a SQL Server query to select the record(s) in the database for transferring or deleting.

During configuration time, you can set the runtime query to use either a free format SQL Server string or the combination of a column name and column value. If you use a free format SQL Server query string, you must enter a valid SQL Server query into the QueryString attribute. The query executes as:

SELECT ALL WHERE QueryString

When using the combination of a column name and column value to query the database, you must enter a valid column name in the QueryColumnName attribute (this is typically set at configuration time) and the lookup value in the QueryColumnValue attribute. The query executes as:

SELECT ALL WHERE QueryColumnName = "QueryColumnValue"

The DBToAttrCmd and DBToTempCmd attributes return an error if more than one record is returned by the query and no values are transferred. To prevent a query returning multiple records when using the column name and column value query, the selection of a column name that is not configured to be unique generates a warning when the object is saved. This warning cannot be applied to the free format query string.

Note: The RecordDeleteCmd attribute can be used to delete multiple records; therefore, no error is generated for this command if multiple records are returned by the query.

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