ALLBASE/SQL Reference Manual (36216-90216)

220 Chapter7
Data Types
Binary Operations
Date/Time Data Types and Aggregate Functions
You can use the aggregate functions MIN, MAX, and COUNT in queries on columns of type
DATE, TIME, DATETIME, and INTERVAL. SUM and AVG can be done on INTERVAL
data types only.
Binary Operations
BINARY or VARBINARY values may be assigned to a column with a matching data type
or to a fixed or variable length character string host variable. All rules regarding
assignment to a character string are also true for binary assignment to a character string
variable.
LONG BINARY and LONG VARBINARY values cannot be converted to any other type,
and cannot participate in any expressions except as assignments to long functions and
string functions.
Character (ASCII) or hexadecimal format is used when inserting BINARY and
VARBINARY data literals into a column. Hexadecimal format is preceded by the
hexadecimal indicator 0x when inserting data through ISQL, but not if you are inserting
data through an application program. The result of a SELECT statement on a BINARY or
VARBINARY column is in hexadecimal format.
You cannot insert BINARY literals (0's and 1's) into a CHAR column in ISQL; however, you
can insert them in an application program using a host variable.