VERIFIED SOLUTION i
X

How to run SQL Select queries using wildcards in MapInfo Pro

UPDATED: September 19, 2017


To do this, users will need to use a wildcard character along with the "Like" operator.
In MapInfo Pro, there are two wildcard characters. "_" is a single character wildcard while "%" is a multi-character wildcard.

So to select all of the postcodes from the "B73 6" sector users would need to run:

Select * from PostCodes where Postcode Like "B73 6A__" into Selection

Or:
 
Select * from PostCodes where Postcode Like "B73 6%" into Selection

If users know how many characters they wish to wildcard,  then the first option is the best as this will ensure that any incorrectly formatted postcodes will not be picked up in the selection.
Since all of these postcodes are correctly formatted both of these selections will return the following records:

 
RowID | Postcode
-------------------------
2         | B73 6AB
3         | B73 6AC
4         | B73 6AD
5         | B73 6AE
 

 

Environment Details

Products affected: MapInfo Pro™
 

Downloads

  • No Downloads