2004
Table Of Contents
- Contents
- Chapter 1 - Find the Information You Need
- Part 1 - The User Interface
- Part 2 - Start, Organize, and Save a Drawing
- Part 3 - Control the Drawing Views
- Part 4 - Create and Modify Objects
- Chapter 14 - Control the Properties of Objects
- Chapter 15 - Use Precision Tools
- Chapter 16 - Draw Geometric Objects
- Chapter 17 - Change Existing Objects
- Part 5 - Hatches, Notes, and Dimensions
- Chapter 18 - Hatches, Fills, and Wipeouts
- Chapter 19 - Notes and Labels
- Chapter 20 - Dimensions and Tolerances
- Part 6 - Create Layouts and Plot Drawings
- Chapter 21 - Create Layouts
- Chapter 22 - Plot Drawings
- Part 7 - Share Data Between Drawings and Applications
- Chapter 23 - Reference Other Drawing Files (Xrefs)
- Chapter 24 - Link and Embed Data (OLE)
- Chapter 25 - Work with Data in Other Formats
- Chapter 26 - Access External Databases
- Overview of Using AutoCAD with External Databases
- Access a Database from Within AutoCAD
- Link Database Records to Graphical Objects
- Use Labels to Display Database Information in the Drawing
- Use Queries to Filter Database Information
- Share Link and Label Templates and Queries with Other Users
- Work with Links in Files from Earlier Releases
- Part 8 - Work with Other People and Organizations
- Chapter 27 - Protect and Sign Drawings
- Chapter 28 - Use the Internet to Share Drawings
- Chapter 29 - Insert and View Markups
- Chapter 30 - Publish Drawing Sets
- Part 9 - Create Realistic Images and Graphics
- Glossary
- Index
754 | Chapter 26 Access External Databases
The tabbed progression of the Query Editor is particularly useful in becoming
familiar with SQL syntax. For example, you can create a query using the
Quick Query tab and then select the SQL Query tab to view how your query
is formatted using SQL.
The Query Editor provides the following tabs for building queries:
■ Quick Query. Provides an environment where you can develop simple
queries based on a single database field, single operator, and single value.
For example, you can find all records from the current table where the
value of the "room type" field equals "office".
■ Range Query. Provides an environment where you can develop a query
that returns all records that fall within a given range of values. For exam-
ple, you can find all records from the current table where the value of the
"room area" field is greater than or equal to 90 square feet and less than or
equal to 120 square feet.
■ Query Builder. Provides an environment where you can develop more
complicated queries based on multiple search criteria. For example, you
can find all records from the current table where the "room type" equals
"cubicle" and room area is greater than 80 square feet.
■ SQL Query. Provides an environment where you can develop
sophisticated queries that conform with the SQL 92 protocol. For
example, you can select * from california.headquarters.room where
california.headquarters.room.type = 'cubicle'
and
california.headquarters.room.area < 80.
See “Construct Simple Queries” on page 754 for detailed information about
constructing queries and working with operators. If you are already comfort-
able building database queries, see “Use the Query Builder” on page 758.
To open the Query Editor
1 In the dbConnect Manager, in the tree view, select a table.
2 Click the New Query button.
3 In the New Query dialog box, enter a name for the query in New Query
Name.
4 Choose Continue to open the Query Editor.
Construct Simple Queries
The simplest query uses one operator to search one field for a certain value.
The range query searches one field to return records that fall within a range
you specify.