beautypg.com

Making queries using the select command, Making queries using the sql select command – Pitney Bowes MapInfo Professional User Manual

Page 234

background image

Making Queries using the Select Command

MapInfo Professional has two commands for selecting objects through querying: Select and SQL Select.
Select is simpler and SQL Select is more powerful.

To make a query:

1. Choose Query > Select. The Select dialog box displays.

2. Click on the Select records from table drop-down list and choose the table from which to select the

records.

3. Type your query expression in the that satisfy box, or click the Assist button to display the

Expression dialog box which helps you write an expression.

4. Type a name in the Store Results in table box for the temporary table that stores the results of your

query or choose selection (the default). If Selection is chosen, MapInfo Professional automatically
names the table Query 1, Query 2 etc.

5. To sort the query by the value in some column (optional) click the Sort results by column drop-down

list and choose the column containing the value you want to sort with.

6. Click OK. A Browser window of your query results displays if the Browse Results box is checked.

You can use Select to highlight objects in a map or a table that meet certain criteria and create a results
table that you can browse, map, or graph like any other table.

• When you are working in a Browser window, the records meeting the criteria of the query are highlighted.

• When you are working in a map, the graphic objects of the chosen records are highlighted.

• When you are working with both a Map window and a Browser window, the objects and the records

are highlighted.

In all cases, a working table is automatically created called Query 3. This table contains the results of
the query. You can map, or graph this table like any other table. The table can also be saved as a
separate table with Save Copy As.

• For more information, see Saving Queries and Loading Templates in the Help System.

Making Queries using the SQL Select Command

To create a query using SQL Select:

MapInfo Professional 12.5

234

Querying Your Data in MapInfo Professional