Create Query statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Generates a query table that represents the current contents of the specified Browser window. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Create Query 
	From Window window_id  
	Into query_name  

window_id is an Integer window ID number identifying a Browser window.

query_name is the name of the query table to generate.

Error Conditions

ERR_TABLE_ALREADY_OPEN error is generated if there is already a table open with the name query_name and the table is not a query table.

Description

After you have applied sort and/or filter conditions to a Browser window, you might want to perform other operations on the results of the filter. Use the Create Query statement to generate a query table that represents the current contents of the Browser. The resulting query represents the set of rows that satisfies the filter conditions. You can then use the query in other MapBasic statements, such as the Update statement, Commit Table statement, and Map statement.

Example

Browse * From World 
Set Browse Filter Where (Continent = "North America" Or Continent = "South 
America") 
Create Query From Window Frontwindow()  into Americas 
Map From Americas

See Also:

Set Browse statement, Select statement