Use disjunctions in complex queries
-
- UpdatedJan 30, 2025
- 1 minute read
- Yokohama
- Table Administration
ServiceNow performs conjunction statements before disjunction statements in a query.
When you create a complex query, you must use parenthesis around disjunctions where appropriate to ensure proper grouping of query elements. For example, you must use parenthesis in the query (md_table = 'incident' || md_table = 'task') && mi_definition = md_sys_id && mi_id = inc_sys_id. Removing the parenthesis from this query returns all records where the md_table value is incident.
Related Content
- Database view creation
Create a database view to join tables. You can then create a report based on the database view.
- Displaying function results in a database view
Enhance the display of a database view by adding a function field to the output to display function results.
- Database views in the base system
Certain views are included in the base system with the Database Views and Database Views for Service Management plugins.