Making Queries using the Select By Attribute Command - MapInfo_Pro - 2023

MapInfo Pro Help

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapInfo Pro
Version
2023
Language
English
Product name
MapInfo Pro
Title
MapInfo Pro Help
First publish date
1985
ft:lastEdition
2023-09-12
ft:lastPublication
2023-09-12T16:39:16.995549

Use the Select By Attribute window to create a selection using the conditions and attributes from the table directly.

To make a selection:

  1. In the Selection group on the TABLE/MAP/SPATIAL tab, click on the SQL list and then click on Select By Attribute. The Select By Attribute dialog box displays. You can also launch this command from the map window's context menu. Alternatively, press (Ctrl+Shift+z) to open the Select By Attribute dialog box when a mappable tables is open and active.
  2. Use the Table drop-down lists to choose the table from which to create the selection. The list of tables includes query tables as well as the current Selection if there is one.
    Note: Each item in the lists has a tool-tip showing table descriptions, if any, the table's coordinate system, and the number of records in the table.
  3. Use the Conditions section to specify the conditions and attributes to use when selecting objects from the table.

    The Conditions scrollable list contains a list of columns from the table whose values you can use to query the table with various conditions. The column list by default displays 40 columns from the table. Indexed columns are given priority in this list and displayed first. If your table has more than 40 columns, click the Add.. button at the top of the Conditions section to add more columns to the list. By default 1000 values are loaded for a particular column. If your table columns has more than 1000 rows, click the refresh button at the end of each column to load another 1000 rows.

    You can choose from a list of options at the top of the Conditions section to narrow down your selection:

    1. All: (AND) All specified condition in the column list must be met for the record to be included in the result set.
    2. Any: (OR) Any one condition in the column list must be met for the record to be included in the result set.
    3. Add: Add more columns to the column list.
    4. Indexed: This is a toggle button. Only indexed columns will be shown in the column list when pressed.
    5. Empty: This is a toggle button. Empty columns without any conditions will not be shown in the column list when pressed.
  4. Enter a name for the selection query. This name is also added to the Recent list in the SQL list drop-down in the Selection group.
  5. Select how to display the script results from the following option at the bottom:
    1. Display results in new Browser window

      If the button is pressed MapInfo Pro displays the query results in a new Browser window.

    2. Add results to topmost Map window

      If the button is pressed MapInfo Pro adds the results as a new layer to the top-most map window and brings that map to the front, or creates a new map window if none exist.

    3. Add color override to results added to topmost Map Window split button

      When adding the results of the query to a map window, this option applies a color override with the selected color. Color override is off by default (shows "None" and a Paint Can icon). Click on the split button to open the pop-up to select different modes.
      • First radio button turns off color override, the split button icon shows the Paint Can and "None".
      • Second radio button switches to "Automatic" mode where colors are initialized to a Color Brewer qualitative color group (8 colors), the split button icon changes to show the next color with a gradient border.
      • Third radio button switches to "Manual" mode using the color currently shown next to the third button, the split button icon changes to the selected color with no border. Or you can click directly on the color palette drop down to switch to "Manual" and open the color palette picker and select a different color. This color remains sticky and will not change unless the user selects a different color from the palette or switches to Automatic mode.

      When you click directly on the color palette drop down, this opens the color palette picker. The "Automatic Colors" section shows all the colors that are used for automatic mode. Any of these colors can also be selected as the manual color.

    4. Find results in Map or Browser windows

      If the button is pressed MapInfo Pro finds results in map and browser windows. In a map window, the view will zoom to the extents of the selection if "Zoom on Find Selection" Map Preference is checked (see the Editing tab in the Map Preferences dialog). The button is disabled when the NoSelect button is pressed.

    5. Execute the query without changing the current selection (NoSelect)

      If the button is pressed MapInfo Pro performs the query without changing the pre-existing Selection table. Press this button if you need to perform a query, but you do not want to de-select whatever rows are already selected. The button is disabled when the output table name is "Selection". Change the output table name to something other than "Selection" to enable the button.

  6. Click Run to execute the selection query.