User Guide

Table Of Contents
489
CHAPTER 22
Using Query of Queries
A query that retrieves data from a record set is called a Query of Queries. After you generate a
record set, you can interact with its results as if they were database tables by using Query of
Queries. This chapter describes the benefits and procedures for this feature.
Contents
About record sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
About Query of Queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
Query of Queries user guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
About record sets
Query of Queries is based on manipulating the record set, which you can create using the
cfquery tag and other ways.
When you execute a database query, ColdFusion retrieves the data in a record set. In addition to
presenting record set data to the user, you can manipulate this record set to improve your
applications performance.
Because a record set contains rows (records) and columns (fields), you can think of it as a virtual
database table, or as a spreadsheet. For example, the
cfpop tag retrieves a record set in which each
row is a message and each column is a message component, such as To, From, and Subject.
Creating a record set
You can perform a Query of Queries on any ColdFusion tag or function that generates a record
set, including the following:
cfcollection
cfdirectory
cfftp
cfhttp
cfindex
cfldap