Any query created using the Select or SQL Select commands can be saved as a MapInfo Pro query table. Query tables consist of a .TAB file and a .QRY file. After you have executed a Select or SQL Select statement, on the TABLE tab, in the Content group, click Save Table or Save Query to save the query as a table. When you open this table, the tables on which the query is based are re-opened and the query is re-executed.
Saving Queries to Workspaces
You can also save queries in workspaces. When you open a workspace that contains a query, the query will execute and any windows created by the query will redisplay. Unlike saving a query as a table, a separate .TAB file is not created when you save a query to a workspace.
Activating Save Query when Using a Workspace
To activate the Save Query option when using a workspace, you must activate the Save Queries in Workspaces option in the Startup Preferences dialog box.
- On the PRO tab, click Options, and Startup to open the Startup Preferences dialog box.
- Check the Save Queries in Workspaces option (default setting).
- Click OK.
If you selected this option and open a workspace, the associated queries are regenerated. A separate MapInfo Pro table (.tab) file for the queries is not created.