Using data types with Query by Example
A value in a QBE expression must match the data type of the data source field to which it applies. For example, you must use a numeric value in a QBE expression that filters a numeric field. Do not include characters, such as commas used as placeholders, when typing a numeric parameter value.
Using a null value in a QBE expression
To specify that a field in the database must or must not contain a data value, use the keyword Null. To specify that the field must not contain a data value, type Null as the QBE expression. To specify that a field must contain a data value, type !Null as the QBE expression. Null is not case sensitive.
Using a date in a QBE expression
To supply a date in the short date format, use the locale-specific date separator and date format order. Table 3-6 lists examples of correct date formats in different locale settings.
When you use a date in a QBE expression, use four-digit years rather than two-digit year abbreviations. For example, to signify January 15, 2011, type 01/15/2011 rather than 01/15/11.
Matching an exact string value in a QBE expression
To ensure that only exact values are found in data sources, enclose the text string in single quotation marks in the QBE expression. Returned data must match the enclosed string exactly. Returned data does not include values that have additional characters at the end of the string. A comma appears as a list separator for Smith, Jan. To specify a locale-independent list separator, use the pipe sign (|).
Table 3-7 lists the values that example QBE expressions return.
'Smith' or 'Smith ' or 'Smithson'
Making a literal character in a QBE expression
A specific syntax is required when a QBE expression attempts to match a value using an operator character as a literal character. Operator characters are shown in Table 3-4. Type a backslash (\) before each special character, or enclose the string in single quotation marks, which directs the application to match the string value exactly. For example, typing a backslash before the comma directs the application to interpret the comma literally in the following QBE expression:
16M x 1 Dynamic Ram\, 3.3 volts
Without the backslash, depending on your locale setting, Deployment Kit interprets the comma as an OR.
To specify a list separator that is locale independent, use the pipe sign (|).
The following QBE expression matches the percent sign (%) literally in a string:
'ab\%c'

Additional Links:

Copyright Actuate Corporation 2012