MapInfo Products KnowledgeBase
Product:
MapInfo
Version:
4.x\5.x\6.x
Platform:
Win9x\NT\2000
Category:
SQL Select\Select
Summary:
Selecting all objects of a certain type.
Question:
How to select all objects of a certain type? For example, how to select all the "line" objects in a table?
Answer:
Choose Query>SQL Select. Specify the table name in the From Tables box. Click in the Where Condition box. Click on the Functions button. Choose the STR$() function. Within the parentheses, type in obj. Outside of the parentheses, type the equal sign. In quotes, put the object type to be selected.
For example:
Where Condition: Str$(obj)="Line"
Any of the following object types may be used in the query:
"Point", "Multipoint", "Line", "Polyline", "Region", "Collection", "Rectangle", "Rounded Rectangle", "Arc", "Ellipse", or "Text".
Note: Str$(obj) will return a null string [ "" ] if there is no object associated with a row. To select all rows in a table that have no associated map object (for example, all ungeocoded rows after a geocoding operation) use the where Condition: Str$(obj)="".
Select * where not obj is another method and is probably faster than a string comparison to find an empty string.
Last Modified:
07/31/2001 01:57:45 PM
Document URL:
http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/34A146B8EDA1D2D185256270007BD8F8
Selecting all objects of a certain type.^34A146B8EDA1D2D185256270007BD8F8^Y