About Query Criterion Values

When you create a query expression using a Criterion type, you compare an attribute that you specify with a value that you select. Constant values must have a data type that is correct for the attribute to which it is being compared. A data type defines the format of a value and the possible range of values. For example, the NetBIOSName attribute is stored as a string and the Disk Storage Size attribute is stored as a number.

There are four data types that are used by SMS: numerical, string, date/time, and parameterized. Each query attribute stores data by using one of these data types. When specifying query attributes, the criterion value that you can specify depends on the data type of the query attribute. Following are guidelines for specifying the appropriate criterion value for each of the four data types:

Numerical Values

You must specify a numeral that the query uses to evaluate the expression. (If you specify a value that is not numerical, the query fails.) You can use either decimal or hexadecimal values.

String Values

You must specify the exact string the query will use to evaluate the expression — do not use quotation marks unless they are part of the string. For relational operators that perform LIKE comparisons ("is like" or "is not like"), you can use wildcard characters within the string. You can use the following wildcards:

Wildcard Description
% Any string of zero or more characters
_ (underscore) Any single character
[] Any single character within the range or set (for example [a-f] or [abcdef])
[^] Any single character not within the specified range (for example [^a-f] or [^abcdef])

Date and Time Values

You must enter a date that the query can use to evaluate the expression. This value must be entered according to the units specified by the date/time operator. For example, if you use the "year is after" operator, you would enter the year by using four digits (for example, 1997).

Parameterized Values

The SMS Administrator console prompts you for the actual value to use when the query runs.

Related Topics

Topic Link

About Queries

Topic Link

Using Queries to Locate Resources Overview