ALLBASE/SQL Reference Manual (36216-90216)

Chapter 8 259
Expressions
TID Function
pseudotables.
In order to assure optimization (through the use of TID access) the expressions in the
WHERE clause of a single query block must be ANDed together. No OR is allowed. In
addition, only the following TID expressions can be optimized:
TID([ [
Owner.
]
TableName
[
Owner.
]
ViewName
CorrelationName
]) =
{
Constant
HostVariableName
[[INDICATOR]:
IndicatorVariable
]
?
:
LocalVariable
:
ProcedureVariable
}
Only equal and not equal comparison operators are supported.
The TID function cannot appear in an arithmetic expression.
The TID function can be used in a restricted set of SELECT statements. A valid SELECT
statement must
not
specify the following:
An ORDER BY or GROUP BY on the TID function.
A HAVING clause containing the TID function.
The TID function in the select list when a GROUP BY or HAVING clause is used.
An aggregate function on the TID function.
Any TID function along with an aggregate function in the select list.