2004

Table Of Contents
Use Queries to Filter Database Information | 753
Use Queries to Filter Database Information
A query to the database is a search criterion that you construct to return the
records you want.
Overview of Queries
Part of the fundamental power of database systems is their ability to present
a subset of records based on a search criterion or query that you specify. For
example, you might have a database table containing records of all the rooms
that exist at your company’s headquarters facilities. Suppose that you want
to prepare a report that lists all conference rooms that can seat more than 20
people. Using the AutoCAD Query Editor, you can easily construct a query
that returns the subset of records or linked graphical objects that you want
to see.
The Query Editor consists of a series of four tabs that you can use to develop
queries. The tabbed progression is designed to make working with queries
simple, even if you are not familiar with Structured Query Language (SQL).
If you are unfamiliar with queries, work with the Quick Query and Range
Query tabs initially until you become familiar with query syntax. Once you
learn the basics involved in developing meaningful queries, you can progress
to the Query Builder and SQL Query tabs.
You can begin creating a query in one tab and continue to refine it or add
additional parameters in subsequent tabs. You might, for example, begin
creating a simple query in the Quick Query tab and subsequently decide that
you would like to add an additional condition using the Query Builder tab.
When you choose the Query Builder tab, it displays the values that you
initially selected using the Quick Query tab, and you can add additional
conditions to the query. However, you cannot move backwards through the
tabs once you have changed the query in one of the later tabs, because each
subsequent tab provides additional functions that are not available in the
previous tabs. If you attempt to move backwards through the query tabs after
modifying a query, AutoCAD prompts you with a warning indicating that
the query will be reset with its original default values.