Reporting → Report Search Criteria → Using Advanced SQL Conditions in SBM Reports → About SBM–Processed SQL → Examples of SBM–Processed SQL
When a field name contains spaces or any other non-alphanumeric characters, enclose the field name within double quotation marks (").
The following examples are created using fictional data. These examples show you how to handle multi-word names.
Finding items you own
Finding items owned by any user, or a subset of users
Owner IN ("Joe Manager", "Sarah Developer", "Tom Support Manager")
Finding items for a subset of projects
Project IN ("Professional Suite", "Image Builder")
Finding all active primary items
"Active/Inactive" = Active
The quotation marks around Active/Inactive are necessary because of the forward slash (/) character.
Find primary items with Severity of Critical or High:
(Severity = Critical) OR (Severity = High)
Find primary items with Severity of Critical, High, or Medium:
You have the option of using the OR operator, as above, or the IN operator. The following example shows how to use the IN operator.
Severity IN (Critical, High, Medium).
Find assigned primary items owned by Joe Manager:
(State = Assigned) AND (Owner = "Joe Manager").
The quotation marks around Joe Manager are necessary because of the space between the names.
Find items submitted on or after June 1, 2002:
"Submit Date/Time" >= "6/1/02".
Find items submitted in the last two weeks:
"Submit Date/Time" >= (now - 14)
Find items that contain a particular text string in the Description field:
Description LIKE '%testing%'
Find items for which the title begins with a certain text string:
Title LIKE 'Image%'
Find items using a combination of operators. Find items submitted after December 1, 2001, which were later deferred:
("Submit Date/Time" > "12/1/01") AND (State = Deferred)
Copyright © 2013–2019 Micro Focus or one of its affiliates. All rights reserved.