Difference between revisions of "MI Selecting Subsets"

From Tuflow
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
<li>Import the 1d_nwk_check.mif layer into MapInfo. </li>
 
<li>Import the 1d_nwk_check.mif layer into MapInfo. </li>
 
<li>To select all channels of Type “C” (ie. pipes or circular culverts) go to Query, Select… to display the dialog below. Ensure the correct table is selected in the 'Select Records from Table' drop down box. In the dialogue box type the following: Type = "C". Click 'OK'.
 
<li>To select all channels of Type “C” (ie. pipes or circular culverts) go to Query, Select… to display the dialog below. Ensure the correct table is selected in the 'Select Records from Table' drop down box. In the dialogue box type the following: Type = "C". Click 'OK'.
+
</li>
 +
[[File:Basic Select.png|frame|none]]
 +
</ol>
 +
<br>
 +
There will now be a temporary table called 'selection' which can be added to a map window opened in a new browser window.
  
 
== SQL Select ==
 
== SQL Select ==
 +
<ol>
 +
<li>Import the 1d_nwk_check.mif layer into MapInfo. </li>
 +
<li>To select all channels of Type “C” (ie. pipes or circular culverts) go to Query, SQL Select… to display the dialog below.  Click in the “from Tables:” field and use the “Tables” drop down list on the top right to select the 1d_nwk_check layer.  Click in the “where Condition:” field and using the Columns drop down list select Type (or Channel_Type for older 1d_nwk_check layers) and complete the expression as per below: <br>
 +
Type = “C”
 +
<br>
 +
ensuring that quotes are placed around the C.  Finally, for the “into Table Named:” field, instead of “Selection” enter “Pipes”.  Use Verify to check your entries and press OK to select all circular culverts and place them in a virtual table (ie. a subset table of the 1d_nwk_check layer) called Pipes. </li>
 +
[[File:SQL Select.png|frame|none]]

Latest revision as of 16:59, 5 September 2011

Introduction

MapInfo offers two methods for selecting subsets of other tables; the basic 'Select' tool and the more powerful 'SQL select'. This example illustrates how the pipes (Type = “C”) in a 1d_nwk_check.mif layer are selected.

Basic Select

  1. Import the 1d_nwk_check.mif layer into MapInfo.
  2. To select all channels of Type “C” (ie. pipes or circular culverts) go to Query, Select… to display the dialog below. Ensure the correct table is selected in the 'Select Records from Table' drop down box. In the dialogue box type the following: Type = "C". Click 'OK'.
  3. Basic Select.png


There will now be a temporary table called 'selection' which can be added to a map window opened in a new browser window.

SQL Select

  1. Import the 1d_nwk_check.mif layer into MapInfo.
  2. To select all channels of Type “C” (ie. pipes or circular culverts) go to Query, SQL Select… to display the dialog below. Click in the “from Tables:” field and use the “Tables” drop down list on the top right to select the 1d_nwk_check layer. Click in the “where Condition:” field and using the Columns drop down list select Type (or Channel_Type for older 1d_nwk_check layers) and complete the expression as per below:
    Type = “C”
    ensuring that quotes are placed around the C. Finally, for the “into Table Named:” field, instead of “Selection” enter “Pipes”. Use Verify to check your entries and press OK to select all circular culverts and place them in a virtual table (ie. a subset table of the 1d_nwk_check layer) called Pipes.
  3. SQL Select.png