Selecting and Using Queries - MapInfo_Pro - 2023

MapInfo Pro Help

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapInfo Pro
Version
2023
ft:locale
en-US
Product name
MapInfo Pro
ft:title
MapInfo Pro Help
First publish date
1985
ft:lastEdition
2023-09-12
ft:lastPublication
2023-09-12T16:39:16.995000

Select allows you to query a table. It allows you to select records and objects from a table according to their attributes. You can use it to highlight objects in a Map or Browser window that meet certain criteria. You can also create a results table that you can browse or map like any other table.

For instance, by formulating queries with Select, you can ask MapInfo Pro to:

  • Show only postal code regions where the average household income is above $65,000.
  • Show only postal code regions where the median age is 42.
  • Show only the postal code regions where the household income is above $65,000 and the median age is 42.
  • Show only records for all orders received in July or September.
  • Show cities of over 100,000 people in Texas, California and Florida.

When you are working in a Browser, MapInfo Pro highlights the records meeting the criteria of the query. When you are working in a Map window, the graphic objects of the chosen records are highlighted. When you are working in both windows, the objects in both are highlighted. In all cases, MapInfo Pro automatically creates a working table called Selection that contains the results of the query. You can browse or map this table like any other table. The table can also be saved as a separate table with Save Copy As.

Finding an Object or Street Address

Your tables must be mappable and indexed. If you need to set up these components, on the TABLE tab, in the Maintenance group, click Table, and Modify Structure.

To find an object or street address:

  1. On the TABLE tab, in the Selection group, click Find, and Mark to open the Find dialog box.
  2. Click the Search table drop-down list and choose a table from which to search.
  3. Click the for objects in column drop-down list and choose the column containing the location information of the objects you are looking for.

    You now have the option of refining the search. Use this option when you are trying to find an object or address whose name is not unique and is used for other objects or locations.

    For example, when you are searching for the town of Ipswich in Great Britain, do you want Ipswich in Suffolk county or Ipswich in Essex county. Refining the search by county allows you to specify the county for each town, rather than just the town name.

    • Optional - Click the Refine search with table drop-down list and choose a refining table (the table must contain regions, such as states, counties, census tracts etc.).
    • Optional - Click the using boundary name column drop-down list and choose your refining column, the column containing the name of the boundary.
  4. Check the Find in Front Window Only check box when you want the Find operation executed only in the Front Window. When this check box is unchecked, the Find operation is executed in all windows. When checked, if features are found, they will be marked with a symbol in a Map Window. If the Browser window is the active window, it will be scrolled so the record appears in the Browser view.

    When you have finished defining where to look for your search data and selecting between the front most map and all maps then specify what data to look for.

  5. Click OK to open the Find dialog box. This dialog box allows you to specify what data to look for.

    The name of the column that you specified in the first Find dialog box is listed to the left of the list box (for example, Street). When locating a street address, type in "# Name", such as "30 Elm St" or "1045 Templar Blvd." What you type in depends on geocoding preferences specified on the PRO tab, when you click Options, and Address Matching.

    Note: MapInfo Pro comes with a text file called MAPINFOW.ABB [MapInfo Pro Abbreviations], that contains a list of common street abbreviations, such as "St" for "Street" and "Blvd." for "Boulevard," and so forth. These help MapInfo Pro to obtain exact matches. To familiarize yourself with the MAPINFOW.ABB file, you can take a look at its contents in the Notepad Text Editor.
  6. Type the name of the object or address you are searching for in this box. If you have used the Refine option in the first dialog box, a second column name is listed (for example, ZIP).
  7. Type the name of the refining boundary in this box. If MapInfo Pro cannot find an exact match for the object you specified, it lists possible matches.
  8. Click Up or Down to move to other pages and choose a specific entry from the list.
  9. Click OK and the find is initiated.

    You can also use the Mark command to locate street intersections. When you type in the name of the object to be found in the second Find dialog box (enter object name to find), separate the two items by a double ampersand (&&). For example, to find the intersection of Congress Street and Christie Street, type "Congress Street && Christie Street."

Finding and Displaying a Selected Object

When you create a query or a SQL query, you may want to see the results of that query visually on the map.

To find and display a selected object:

  1. Do one of the following:
    • On the MAP tab, right-click on the Launcher button in the lower right corner of the group to reach the Select dialog box.
    • On the MAP tab, in the Selection group, click SQL Select to open the SQL Select dialog box.

      The Find Results in Current Map Window check box displays in both dialog boxes.



  2. Create your query and verify that it is correct, selecting the open table that you want to query.
  3. Select the Find Results in Current Map Window check box to display the results upon completion.
  4. Click OK to display the results.
  5. For more information, see Selecting All Objects from a Table in the Help System.

    Figure: Query Results of Urban Population > Rural Population



Selecting All Objects from a Table

To select all objects from a table:

  • For a Browser window, click the Select All button located on the upper-left corner cell of the window. This selects all the records in the table.
  • For a map, on the Layers window, right click the layer sample and select Select All. This selects all the objects in the topmost selectable layer.
  • For a Layout window, press Ctrl+A.
Note: You can also select a layer on the map, right-click to display the context pop-up menu, and select Select All from Selection Layer.