2004

Table Of Contents
760 | Chapter 26 Access External Databases
3 Enter additional query parameters on subsequent rows of the Query grid.
4 Repeat step 2 for each additional parameter except the final query
parameter.
5 Apply any parenthetical grouping, if appropriate. Click the cell to the left
of the Field cell that begins the phrase that you want to group. A single
left parenthesis is inserted. Click the cell to the right of the Value cell that
ends the phrase that you want to group. A single right parenthesis is
inserted.
6 If you want to save the query in the current drawing for future use, choose
Store.
7 Choose Execute to execute the query and close the dialog box.
To specify what fields appear in your returned query
1 Construct your query as described in “To construct a query with a single
parameter on the Query Builder tab” on page 759 and “To construct a
query with multiple parameters on the Query Builder tab” on page 759
2 Select the first field that you want to appear in the Fields in Table list.
3 Above the Show Fields list, choose Add.
4 Repeat steps 2 and 3 for any additional fields you want to display.
To specify a sort order for your returned query
1 Construct your query as described in “To construct a query with a single
parameter on the Query Builder tab” on page 759 and “To construct a
query with multiple parameters on the Query Builder tab” on page 759
2 Select the first field that you want to sort on from the Show Fields list.
3 Above the Sort By list, choose Add.
By default, AutoCAD sorts the selected field in ascending order. Choose
the Sort button to sort in descending order.
4 Repeat steps 2 and 3 for any additional fields that you want to sort on.
Use SQL Queries
The SQL Query tab provides you with both a query editor box where you can
enter a free-form SQL query and a set of tools to assist you in constructing a
query. You can issue any valid SQL statement that conforms with Microsoft’s
implementation of the SQL 92 protocol from this tab. Because not all data-
base management systems are fully compliant with the SQL 92 standard, you
should review your system’s documentation to see what SQL commands are
valid for your particular database.