Crestron
e-control Database Manager SW-DBM
37
••
The Database File
Installation & Reference Guide — DOC. 5823
A logical condition is an expression. An expression is a combination of column
names, operators, and values. There are several types of operators that you can use to
define the expression you need.
Arithmetic operators form new numeric values by operating on numbers or columns
that contain numbers. Examples are addition (+), subtraction (-), multiplication (*),
and division (/). They operate on numbers and on columns that contain numbers.
Relational operators compare columns and values. The result of a relational
expression is true (include record in query) or false (exclude record from query).
Examples are
equal
(=),
greater than
(>),
less than
(<),
greater than or equal to
(>=), and
less than or equal to
(<=).
Logical operators manipulate relational expressions to return a value of (include
record in query) or false (exclude record from query). Examples are AND, OR, and
NOT. AND connects two relational expressions; both must be true for the combined
expression to be true. OR connects two relational expressions; at least one must be
true for the combined expression to be true. NOT operates on one relational
expression; it reverses the value from true to false or false to true.
String operators manipulate text strings and columns that contain text values. An
example is concatenation (&) which creates one text string by concatenating two
individual strings.
ListFields
The
listFields
column identifies the columns that comprise the scroller contents. It is
used to construct the SELECT clause of the SQL request. There number of fields
listed must be equal to (or greater than) the number of columns the scroller is
currently using.
Successive queries require additional sets of list fields to be given, one set per line.
The first field in each set is added to the implicit conditions (to the WHERE clause)
of the next query level.
DataFields
The
dataFields
column identifies the columns from the picked record to be sent to
the touchscreen. The order of fields is as listed in the
datafields
field of the
Queries
table.
Example: Three fields are listed in
datafields
. When a record is picked from the list,
the three fields are echoed back to the system using the
Data
1
, Data
2
,
and
Data
3
signals.
However, note that only fields defined by the data filter bit pattern are sent.
(See
DataFilter
in the Signal Reference for more information.)
SQL
If you know the SQL programming language, you can enter a SELECT command in
this column to be used as the query for selecting records from the table. The query is
taken from this column instead of being constructed from the previously described
columns.
N
OTE
:
Even if you supply your own SELECT command, you must still provide the list of fields to
be displayed in the list in the
listFields
column and the list of fields to be displayed in the opened
record in
dataFields.