Use cases

Filter data using an SQL query to display specific data from the database.
You can compose a query:
  • As text
  • By using the String formatter and its relative placeholders:
    sql_identifier
    and
    sql_literal
    .
TIP: Do not specify the table name in the
FROM
clause. Specify the table name in the dynamic link to the
BrowseName
of the table with an
{0:sql_identifier}
placeholder in a string formatter.

Use case: filter by time

Filter by time
Expected behavior
Query to achieve the expected behavior
Export records with a Timestamp greater than a certain instant of time.
SELECT * FROM {0:sql_identifier} WHERE Timestamp > {1:sql_literal}
Export records with a Timestamp between two instants of time.
SELECT * FROM {0:sql_identifier} WHERE Timestamp BETWEEN {1:sql_literal} AND {2:sql_literal}

Use case: filter by alarm severity

Filter by alarm severity
Expected behavior
Query to achieve the expected behavior
Export the history of alarms with severity 1.
SELECT * FROM {0:sql_identifier} WHERE Severity = 1
Export the history of alarms with severity between 1 and 3.
SELECT * FROM {0:sql_identifier} WHERE Severity BETWEEN 1 AND 3

Use case: filter by alarm or variable

Filter by alarm or variable
Expected behavior
Query to achieve the expected behavior
Export the alarm history with a given BrowseName in the past.
SELECT * FROM {0:sql_identifier} WHERE ConditionName = {1:sql_literal}
Export the history of alarms connected to the variable.
SELECT * FROM {0:sql_identifier} WHERE SourceName = {1:sql_literal}
Export the history of alarms starting with Exclusive.
SELECT * FROM {0:sql_identifier} WHERE ConditionName LIKE 'Exclusive%'

Use case: filtering Recorded Alarms

Filtering Recorded Alarms
Expected behavior
Query to achieve the expected behavior
Export the alarm history with only the Italian columns.
SELECT "ActiveState_it-IT", "AckedState_it-IT", "ConfirmedState_it-IT", "ConditionName", "EnabledState_it-IT", "SourceName", "Time", "Message_it-IT", "Severity" FROM {0:sql_identifier}
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal