Share this Page URL

Chapter 9. Extending Your Use of Queries > Creating SQL-Specific Queries - Pg. 324

Extending Your Use of Queries 324 Just the Steps Run a make-table query 1. 2. 3. 4. 5. 6. 7. 8. 9. Start a new query in Design view. In the Show Table dialog box, add the tables you need in the query. From the table field lists, add the fields you need in the query to the query design grid. On the Query menu, click Make-Table Query. In the Make Table dialog box, enter the name of the table you want to create, and then click OK. In the Criteria row, enter any criteria you need to select the records you want to include in the new table. Click the View button to open the query in Datasheet view and review the records that will be added to the table. Switch the query to Design view, and then click the Run button on the toolbar. Click Yes in the message box to create the new table. Creating SQL-Specific Queries Earlier in this chapter, we mentioned that you can create some types of queries only by using SQL statements. You might never need to use a union query, a pass-through query, or a data-definition query-what Access calls SQL-specific queries--but under certain conditions, these queries are the precise tool you need to help finish a task or meet a requirement of your database. If you find that you need to create SQL-specific queries frequently, you should learn more about SQL and the syntax that you use. In the following sections, we'll describe the basics of union, pass-through, and data-definition queries. To start building an SQL-specific query, open the Query Design window, click SQL-Specific on the Query menu, and then select the type of query you want to create.