Product: MapInfo Professional
Version: 8.0
Platform: Citrix; Windows 2003 Server Enterprise; Windows 98 SE; Windows NT 4.0 SP6A; Windows XP Home; Windows XP Home SP1A; Windows XP Home SP2; Windows XP Professional; Windows XP Professional SP 1A; Windows XP Professional SP 2; Windows 2000 Professional SP4
Category: MWS
Summary:
Support for saved queries added to MWS (XML) files (MapInfo Professional v8.0).
Question:
Support for saved queries added to MWS (XML) files (MapInfo Professional v8.0).
Answer:
To enhance the usability of MapInfo’s native XML workspace files (.mws files), MapInfo has added new SQL query capabilities. It is possible to write MapBasic SQL queries that are saved to a workspace file as MapInfo SQL language queries and the map definitions based on those queries to an MWS file. In MWS, they are saved as MapXtreme Views in a MapInfoSQLDataSourceDefinition element in the DataSourceDefinitionSet. SQL queries and the MWS map definition layers based on them, are written to the MWS if Save Queries In Workspace in the Options>Preferences>Startup dialog box is selected. Only queries referenced by a Map window are written to the MWS. To see this new functionality:
1. Select the Save Queries In Workspace option in the Options>Preferences>Startup dialog box:

Note: If this checkbox is not selected and the map selected from the Select Mapper Windows dialog box has only one layer based on a query, the query is not saved, and the application writes a map definition with an empty layer list.
2. Create and execute a SQL query.
Note: Only SQL statements created using the Query>Select , Query>SQL Select, or the MapBasic Select statements can be saved in workspaces.
3. Create a Map window based on the SQL query.
4. Select File>Save Workspace and select the MapInfo Workspace format (*.MWS) as the output format.
Note: MapInfo Professional cannot map selections with Group Bys, so Group By clauses are ignored. MapInfo Professional only translates the Order By clause.
Important: MapInfo Professional cannot support subselects in queries. The operators ANY and ALL and subselects are not supported in the MapXtreme 2004 versions of MapInfo SQL.
Last Modified:
|