Performing A Query On A Query - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

Using Query Results in Queries
Boolean predicates:
LIKE
NOT LIKE
IN
NOT IN
BETWEEN
NOT BETWEEN
AND
OR
Comparison operators:
<=
>=
=
<
>
<>
You can also do the following tasks:

Performing a query on a query

To generate a query using an existing query:
Note
You cannot add a literal value as a column to the SELECT list in a query of queries.
Your query generates a new query results set, identified by the value of the
attribute. The following example illustrates the use of a master query and a single
detail query that extracts information from the master. A more extended example
would use multiple detail queries to get different information from the same master
query.
Use the results of one or two queries in your SQL statement.
Generate computed columns.
Specify the
cfquery tag's dbtype
Do not specify a
datasource
Specify the names of one or more existing queries as the table names in a SQL
SELECT statement.
If the database content does not change rapidly, it is a good idea to use the
attribute to cache the query results of between page requests. This
cachedwithin
way, ColdFusion accesses the database on the first page request, and does not
query the database again until the specified time expires. Note that you must use
the
CreateTimeSpan
Aggregate functions:
Count([DISTINCT][*] expr)
Sum([DISTINCT] expr)
Avg([DISTINCT] expr)
Max(expr)
Min(expr)
You cannot nest aggregate
functions.
attribute as "
attribute.
function to specify the
query".
attribute value.
cachedwithin
35
name

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents