When you create a query or a SQL query, you can display the results visually on the map.
To find and display the results of a query automatically:
- Do one of the following:
- From the TABLE tab click on the Launcher button in the lower right corner of the Selection group. The Select dialog box. You can also do this from the MAP or SPATIAL tabs.
- From the TABLE tab, select SQL Select to display the SQL Select dialog box
The Find Results in Current Map Window check box displays in both dialog boxes. If there are no open Map windows, this check box is disabled. You cannot save this check box setting to a template. This option is cleared by default.
- Create your query and verify that it is correct, selecting the open table that you want to query.
- Select the Find Results in Current Map Window check box to display the results. Click OK.
Choosing Which Columns Appear in the Results Table
If you enter one or more column names in the Select Columns field, the results table will include only those columns. This is useful when you are using a table that has many columns, but you only want to work with a few of those columns (perhaps because only a few of the columns fit on the screen at once).
To enter a list of column names:
- Enter a table name in the From Tables field, if you have not already done so. You can either type a table name or choose a table name from the Tables drop-down list.
- Click in the Select Columns field, so that the insertion point appears in the field.
- Delete the asterisk (if there is an asterisk in the field) by using the Backspace key or the Delete key. The Select columns field can contain an asterisk or a list of column names, but not both.
- Choose a column name from the Columns drop-down list in the right part of the dialog box. MapInfo Pro copies the column name into the Select Columns field.
- Choose additional names from the Columns drop-down list if you want the query to include additional columns. As you select additional column names, MapInfo Pro automatically inserts commas to separate the column names.