Table 6-11 Sql Command Examples With Wildcards; Table 6-12 Sql Command Combination Examples; Wildcards; Combining Commands - Inter-Tel AXXESS Manual

Hide thumbs Also See for AXXESS:
Table of Contents

Advertisement

10.36 In the event that you forget which type it is, you will see an error message pointing out
that you have a "Data type mismatch" and you must return to the statement and enter it cor-
rectly.

Wildcards

10.37 Wildcard characters that can be used for filtering are:
Asterisk (*) means any character or characters are accepted.
Question mark (?) is used to indicate a match of a single character.
10.38 Because filtering uses statements composed of letters as well as numbers, the equal sign
means that an exact match must be present. Therefore, the expression [username] = "FRED*"
will only return a username that has the letters F, R, E, D and an asterisk; that is, an actual
asterisk as the fifth character of the username. It would not return "FREDDY" or "FRED
SMITH." To use the wildcard, the SQL statement must tell the search engine to locate some-
thing that does not exactly equal the search string specified in the quotes. To do this, we use
the SQL command "LIKE."
10.39 The expression [username] LIKE "FRED*" returns usernames of "FRED,"
"FREDDY," "FRED SMITH" or any other username that starts with the letters F, R, E, D.
10.40 In a like manner, the question mark is used to indicate only a single character space is a
wildcard.
10.41 Here are some additional examples:
Table 6-11:
[username] = "FRED?"
[username] LIKE "FRED?"
[username] LIKE "FRED*"
[username] LIKE "FRED??"
[username] LIKE "FRED?*"
[username] > "b"
[username] < "a"
[extension] LIKE "12??"

Combining Commands

10.42 It is possible to combine search patterns using the Boolean operators we have already
discussed, as shown in the following examples:
Table 6-12:
[username] = "FRED" AND [extension] =
"1234"
[username] = "FRED" OR [username] =
"WILMA"
[username] = "FRED" OR [extension] =
"1234"
Wildcards
INTER-TEL
SQL Command Examples with Wildcards
SQL Statement
FRED?
FRED plus any single character
FRED followed by any or no additional characters
FRED followed by any two characters
FRED plus at least one more character
Any username except those beginning with the letter A
Any username that would occur before those beginning
with the letter A, (e.g.
Extensions in the range 1200 through 1299 inclusive
SQL Command Combination Examples
SQL Statement
®
®
AXXESS
MANUAL VERSION 11.0 – May 2008
Search Result
:
blanks)
Search Result
Only 1234 with a username of FRED
Any phone with a username FRED or WILMA
Extension 1234 as well as any with FRED as
the username
Programming
Page 6-59
6

Advertisement

Table of Contents
loading

Table of Contents