In this tutorial you will use the Make Query Table tool in ArcGIS 9.3 to create a new layer by associating the quarter quad rectangles from the quarter quad index table, qq, with associated quarter quad EO records in the qq_eo table. To accomplish this you will first need to import the quarter quad index file qq.shp
and the quarter quad EO csv file, qq_eos.csv
, (downloadable from our website) into a file geodatabase. If you need help in creating geodatabases please see Creating New Geodatabases in ArcGIS help.
Create and populate a new file geodatabase in ArcCatalog.
- Please note in steps 3 and 4 below, in the import dialog under "Field Map", make sure the "area code" field is listed as type "(Text)". If not, right click, select properties and change the field type to text.
- In ArcCatalog make a new file geodatabase and call it “qq_eo”.
- Select the new geodatabase in the left pane of ArcCatalog.
- Right click on the right pane, select Import and then “Feature Class (single)…” to import shapefile qq.shp giving it the output feature class name qq.
- Right click on the right pane again and select Import, then “Table (single)…” to import the table qq_eos.csv into your new geodatabase calling the output table "qq_eos".
Run Make Query Table in ArcToolbox
- In ArcToolbox / Data Managment Tools / Layers and Table Views open the Make Query Table dialog and enter the following:
- Input Tables: navigate to your new qq_eo geodatabase and add qq and then qq_eos. Make sure qq is on top of the list.
- Fields (optional): press the Select All button. Here you can optionally rename fields under the Alias Name column. These names will carry over to your new shapefile. You may also turn off any fields you do not want in the final shapefile. Remember shapefile attribute names must be 10 or fewer characters.
- Expression (optional): qq.area_code = qq_eos.id_code
- Table Name: qq_eos_query_table
- Key Field Options: USE_KEY_FIELDS
- Key Fields (options): check qq_eos.OBJECTID. It is necessary to check this field to make sure that a one-to-many join is achieved so that the qq rectangles are added to each of the qq_eo records.
- Click OK to run the tool.
- Check to make sure the number of records in the new query, qq_eos_query_table, is the same as the original qq_eos table. Open each attribute table in ArcGIS. The number of records is listed in the information bar at the bottom of the attribute window.
To make a shapefile, right click on qq_eos_query_table in ArcGIS TOC (Table of Contents) and select Data / Export Data. Use the options of your choice.
Selected records from a layer can be exproted to a dbf file through the options menu on the bottom right of the attribute table window. The dbf file can then be opened in most spreadsheets and databases for further filtering, sorting, reporting and printing.
Range maps can be made using definition queries in the Layer properties dialog of the qq_eos_query_table or the new shapefile you just created.