Understanding Query of Queries processing

The following discussions describe how Query of Queries handles the following:

Comparing columns with different data types

ColdFusion MX 7 includes enhancements that allow you to compare columns with different data types.

If one of the operands has a known column type (only constants have an unknown column type), Query of Queries tries to coerce the constant with an unknown type to the type of the operand with metadata. The pairs of allowed coercions are as follows:

That is, ColdFusion MX can coerce between binary and string, but not between date and string.

If both operands have known data types, the types must be the same. The only exception is that ColdFusion MX can coerce among integer, float, and double.

If both operands are constants, ColdFusion MX tries to coerce the values, first to the most restrictive type, then to the least restrictive type.

Passing queries by reference

A Query of Queries is copied by reference from its related query; this means that ColdFusion MX does not create a new query when you create a Query of Queries. It also means that changes to a Query of Queries, such as ordering, modifying, and deleting data, are also applied to the base query object.

If you do not want the original query to change, use the Duplicate function to create a copy and create the Query of Queries using the copied query.

Managing complex objects

You cannot use Query Of Queries on a record set that contains complex objects, such as arrays and structures.

Note: You can store a record set in a complex objects.


View comments in LiveDocs