Table 6-8 Sql Command Examples (1); Table 6-9 Sql Command Examples (2) - Inter-Tel AXXESS Manual

Hide thumbs Also See for AXXESS:
Table of Contents

Advertisement

Programming
®
®
INTER-TEL
AXXESS
10.31 You can use the equal (=) and less than (<) or greater than (>) commands to widen the
field of the search. For example, assume a database consisting of eight phones, all phones, with
the extension numbers 1001 through 1008. You could use the following commands to narrow
the list.
Table 6-8:
[extension] < "1005"
[extension] <= "1005"
[extension] = "1005"
[extension] > "1005"
[extension] >= "1005"
10.32 You can also use Boolean operators. For the next chart, assume the same database of
eight stations.
Table 6-9:
[extension] = "1005" OR [extension] = "1006"
[extension] = "1005" AND [extension] = "1006"
[extension] NOT BETWEEN "1005" AND "1007"
[extension] BETWEEN "1005" AND "1008"
[extension] >= "1005" AND [extension] <= "1008"
10.33 Notice how the last two expressions return the same result. You can use either the < and
> symbols or you can use the Boolean expression BETWEEN for the same things.
10.34 Also note that the third expression returned nothing even though it seems like it should
have returned 1005 and 1006. The reason it didn't do this is because that expression requests a
list of phones that have the extension number 1005 and also have the extension number 1006.
To simplify, the AND expression applies to an individual device. To satisfy this, both numbers
would have to be assigned to the same station. This is not allowed by DB Programming. The
correct expression would be to use the operator "OR" which would request a list of phones
having the extension 1005 or the extension 1006.
10.35 Some of the fields do not require quotes around the values. These values are considered
to be numbers, not string expressions. String expressions, such as extension numbers and user
names must always be in quotes. Numeric expressions, such as node and port numbers, should
not be placed in quotes. This chart specifies the type of each field:
Page 6-58
MANUAL VERSION 11.0 – May 2008
SQL Command Examples (1)
SQL Statement
SQL Command Examples (2)
SQL Statement
Table 6-10:
SQL Field Quotes
Field
[circuit]
[description]
[extension]
[node_number]
[port]
[slot_number]
[username]
Resulting List
1001, 1002, 1003, 1004
1001, 1002, 1003, 1004, 1005
1005
1006, 1007, 1008
1005, 1006, 1007, 1008
1005, 1006
Nothing found
1001, 1002, 1003, 1004, 1008
1005, 1006, 1007, 1008
1005, 1006, 1007, 1008
Type
Requires Quotes?
Number
String
String
Number
Number
Number
String
Resulting List
No
Yes
Yes
No
No
No
Yes
SQL Statements

Advertisement

Table of Contents
loading

Table of Contents